Subscribe Mailgun mailing lists from Django
Project description
This Django module provides a FormView and a Form that subscribe the user to a list on Mailgun.
Usage
Install:
pip install django-mgsub pip freeze | grep django-mgsub >> requirements.txt
Add to Django:
# settings.py INSTALLED_APPS += 'mgsub',
Configure credentials:
# settings.py MGSUB_DEFAULT_MAILINGLIST = 'mylist@example.com' MAILGUN_API_KEY = '<secret>'
or:
export MGSUB_DEFAULT_MAILINGLIST='mylist@example.com' MAILGUN_API_KEY=...
Add urls:
# urls.py urlpatterns = [ ... url('^mailinglist/', include('mgsub.urls', namespace='mgsub')), ... ]
Configure:
## settings.py # Setting this to False will disable email sending and the following # settings MGSUB_SEND_WELCOME = True MGSUB_WELCOME_FROM = 'noreply@example.com' # defaults to settings.SERVER_EMAIL MGSUB_WELCOME_REPLY_TO = 'me@example.com' # nothing by default # Subscription email templates MGSUB_WELCOME_SUBJECT = 'Welcome to my list!' # Defaults to: Welcome! MGSUB_WELCOME_TEMPLATE = 'myapp/welcome.html' # HTML template MGSUB_WELCOME_TEMPLATE_PLAIN = 'myapp/w.txt' # Plain text template
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-mgsub-0.2.0.tar.gz
(21.5 kB
view hashes)
Built Distributions
Close
Hashes for django_mgsub-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7875fede7255c3c2c7b22ed6232a317099439b8b1b32201dd79f9a218d26de03 |
|
MD5 | cab0898efffaace3cac8da82f04246c8 |
|
BLAKE2b-256 | 72265c8b1c341e56518fa80020f85f25b44b062fbfe90cd826afbea36ede32d3 |
Close
Hashes for django_mgsub-0.2.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68041caf4f1150d0d992bd2390e7c5b4fe9b16dfe2722dfd3f17b096ed76311b |
|
MD5 | 1f0b81da5fd921e863ebe3a1c66328f9 |
|
BLAKE2b-256 | 601559e9dd52bf21dacd7d2f0c501089a48b2619983bdab32d47aa8aea5e1899 |