Skip to main content

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.


  1. Install:

    pip install django-mgsub
    pip freeze | grep django-mgsub >> requirements.txt
  2. Add to Django:

    INSTALLED_APPS += 'mgsub',
  3. Configure credentials:

    MAILGUN_API_KEY = '<secret>'


  4. Add urls:

    urlpatterns = [
        url('^mailinglist/', include('mgsub.urls', namespace='mgsub')),
  5. Configure:

    # Setting this to False will disable email sending and the following
    # settings
    MGSUB_WELCOME_FROM = ''    # defaults to settings.SERVER_EMAIL
    MGSUB_WELCOME_REPLY_TO = ''     # 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.

Files for django-mgsub, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size django_mgsub-0.2.0-py2-none-any.whl (13.5 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size django_mgsub-0.2.0-py3-none-any.whl (12.6 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size django-mgsub-0.2.0.tar.gz (21.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page