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.5.tar.gz
(22.0 kB
view hashes)
Built Distributions
Close
Hashes for django_mgsub-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbc25f669c9d1afdc63e98c47bd6c665ae3468cc16755a43febe0b3044067575 |
|
MD5 | d4292c05904cef147c81dceb09c2382c |
|
BLAKE2b-256 | 2d8375f3e4629f3b517ba825abb36454016eae71c986a71ea5bd3581ede2d123 |
Close
Hashes for django_mgsub-0.1.5-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eda96527b0a2f8cd5baef2abf0c4b3af11d506ab970c7192a3e275c2b01cf32b |
|
MD5 | 7402d02214abd70f805f3df829517fe5 |
|
BLAKE2b-256 | 49c2bafc81bf774183eaa8a3c025b130f76b7698d5808316442982f2041b72ad |