wagtail / wagtail-newsletter

Send email newsletters based on Wagtail content
https://wagtail-newsletter.readthedocs.io
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Model for newsletter recipients #14

Closed mgax closed 1 month ago

mgax commented 2 months ago

Create a model named NewsletterRecipients to represent the recipients for a newsletter campaign. This might be an audience + optional chioce of segment.

Fields:

Register the model as a snippet. It should be possible for an integrator to subclass this model to add/override fields and use the new model instead. (Of course, to make use of the extra fields, one would also extend/replace the campaign backend).


The audience and segment fields should have ChooserViewSet panels; there's a prototype implementation in models.py and viewsets.py.


The model should be swappable, similar to Wagtail's Document and Image models, and Django's User model, so that the user can add extra fields, e.g. a custom greeting or footer. The Django setting WAGTAIL_NEWSLETTER_RECIPIENTS_MODEL should specify a custom model. If a custom model is in use, don't register the default model as a snippet.