The form to configure a newsletter campaign will be displayed in a new page edit tab.
Create a page mixin class named NewsletterPageMixin. It should define these fields:
newsletter_recipients: foreign key to NewsletterRecipients. This field should persist outside of the revisions process (i.e. restoring a revision should not overwrite the value), see https://github.com/wagtail/wagtail-newsletter/issues/10 for a way to do this.
newsletter_subject: a string; may be empty, in which case the subject will be the page title.
newsletter_campaign: a string; the ID of the campaign in the sending system (e.g. Mailchimp).
The mixin should provide a new page editor tab titled Newsletter. The tab should provide a chooser panel for recipients. More panels to be added later.
The prototype in models.py can serve as a reference.
The form to configure a newsletter campaign will be displayed in a new page edit tab.
Create a page mixin class named
NewsletterPageMixin
. It should define these fields:newsletter_recipients
: foreign key toNewsletterRecipients
. This field should persist outside of the revisions process (i.e. restoring a revision should not overwrite the value), see https://github.com/wagtail/wagtail-newsletter/issues/10 for a way to do this.newsletter_subject
: a string; may be empty, in which case the subject will be the page title.newsletter_campaign
: a string; the ID of the campaign in the sending system (e.g. Mailchimp).The mixin should provide a new page editor tab titled Newsletter. The tab should provide a chooser panel for recipients. More panels to be added later.
The prototype in
models.py
can serve as a reference.