This is a minimal Wagtail project that exemplifies how to integrate wagtail-newsletter
into a project. It includes:
- A page model,
demo.ArticlePage
, that is configured as a newsletter. - A custom permission to restrict newsletter actions,
demo.sendnewsletter_articlepage
. - A moderately complex newsletter template,
templates/demo/article_page_newsletter.html
. - A custom recipients model,
demo.CustomRecipients
.
Get an API key from Mailchimp.
From the top-level repository directory, run:
export WAGTAIL_NEWSLETTER_MAILCHIMP_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-us13
export WAGTAIL_NEWSLETTER_FROM_NAME="My Newsletter"
export [email protected]
python -m pip install --editable='.[testing,mailchimp,mrml]'
./demo/manage.py migrate
./demo/manage.py createcachetable
./demo/manage.py createsuperuser
./demo/manage.py runserver
Then open http://localhost:8000/ in your browser.