Create a model named NewsletterRecipients to represent the recipients for a newsletter campaign. This might be an audience + optional chioce of segment.
Fields:
name (CharField)
audience (CharField)
segment (CharField, optional)
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 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.
Create a model named
NewsletterRecipients
to represent the recipients for a newsletter campaign. This might be an audience + optional chioce of segment.Fields:
name
(CharField)audience
(CharField)segment
(CharField, optional)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
andsegment
fields should haveChooserViewSet
panels; there's a prototype implementation inmodels.py
andviewsets.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.