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.0.tar.gz
(20.7 kB
view hashes)
Built Distributions
Close
Hashes for django_mgsub-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f19605ec0e6e3aff21064f90ae944d24aad47fcdcd68f47570c0f87e8e76186 |
|
MD5 | 1fd0c5ba2a1991b6347e67e5300f5c84 |
|
BLAKE2b-256 | 654878a87fa9748465f9705b4d00972561bea42c9370802f9d098e357767633b |
Close
Hashes for django_mgsub-0.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c032e347438f6dfefa95ebbba395249ba96fa730b14e274d7517ce678ec5400c |
|
MD5 | 80c51d480f71828b70b01a5f6845ab31 |
|
BLAKE2b-256 | 36debb1116e5ba94a7fa2a5ca1d3afbeb3dfff822c8d9f2744f6286440ba58ff |