django_mailjet Package¶
django_mailjet Package¶
Introduction¶
mailjet.contrib.django_mailjet provides generic tools to plug
basic mailjet support in your project.
Advanced users may use
mailjet.contrib.django_mailjet.forms.SubscriptionForm directly
without installing anything.
Installation¶
In settings.py:
- set
MAILJET_LIST_NAMEandMAILJET_LIST_LABEL, note that it may not contain non-alphanumeric characters, those are used as defaults formailjet.contrib.django_mailjet.forms.SubscriptionForm,- add to
INSTALLED_APPS:mailjet.contrib.django_mailjetfor templates to be loadable.
Include mailjet.contrib.django_mailjet.urls in urls.py, ie.:
url(r'^newsletter/', include('mailjet.contrib.django_mailjet.urls')),
Users may now subscribe to your mailing list on /newsletter/.
forms Module¶
-
class
mailjet.contrib.django_mailjet.forms.SubscriptionForm(list_name=None, list_label=None, *args, **kwargs)[source]¶ Bases:
django.forms.forms.FormSimple subscription form
-
api¶ Get or create an Api() instance using django settings.
-
base_fields= OrderedDict([('email', <django.forms.fields.EmailField object at 0x109dbfe90>)])¶
-
declared_fields= OrderedDict([('email', <django.forms.fields.EmailField object at 0x109dbfe90>)])¶
-
list_id¶ Get or create the list id.
-
media¶
-
models Module¶
tests Module¶
urls Module¶
Defines basic urls.
- django_mailjet_subscription_form
- Url to the basic form view: SubscriptionView.
- django_mailjet_subscription_success
- Url to the basic success template.