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.1.3.tar.gz
(21.9 kB
view hashes)
Built Distributions
Close
Hashes for django_mgsub-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 055579e3afdfc2fc8f7d13217fbcd90da084bb8dbd449d35e4d1602a7ad0dc63 |
|
MD5 | 2aabde4381fbd4e34e478f415c892d10 |
|
BLAKE2b-256 | 22d8645c0b3217dd71aa87d3563dca2acb458b51d0869285886e4d977127656f |
Close
Hashes for django_mgsub-0.1.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0066bf73d798c90e6aed761b6aedff7cc3e465d60290f3ba4c46d45fd2a514ca |
|
MD5 | 5566d5c15b4445dc3cb45bd14ab8796a |
|
BLAKE2b-256 | bcdb40b4806ef6f9a3c165ad3ce344fe019e87d3c4420b7a37c969eb77285600 |