A small reusable package that adds a Newsletter app to a project
Project description
Giant Newsletter
A re-usable package which can be used in any project that requires a generic Newletter
app.
This will include the basic formatting and functionality such as model creation via the admin and email sending.
Installation
To install with the package manager, run:
$ poetry add giant-newsletter
You should then add "newsletter"
to the INSTALLED_APPS
in your settings file and to the Makefile
.
In base.py
there should also be a DEFAULT_FROM_EMAIL
and a DEFAULT_TO_EMAIL
. This is used by the email sending method.
Context Processor
If you wish to use the Contact form with the context processor you will need to add newsletter.context_processors.subscription_form
into the TEMPLATES
context processors list. This will allow you to access the form in templates.
Configuration
NEWSLETTER_FORM_FIELDS
allows the user to customise what fields are displayed on the form. This must be a listNEWSLETTER_FORM_FIELD_PLACEHOLDERS
allows the user to customise the field placeholder text. This must be a dict containing the fieldnamesNEWSLETTER_FORM_REQUIRED_FIELDS
allows the user to customise what fields are required on the form. This must be a listNEWSLETTER_FORM_LABELS
allows the user to customise what the field labels are on the form. This must be a dict of field names and their corresponding labelNEWSLETTER_FORM_WIDGETS
allows the user to customise what the field widgets are on the form. This must be a dict of field names and their corresponding widget
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for giant_newsletter-0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f296c5120d0a8111ed40b040f68f67a6d32a49be3922e04da365da1dc61b1fcb |
|
MD5 | 99a8c25cb76017fa54d7028170a90546 |
|
BLAKE2b-256 | f4dcb1022d464cc217a4ee81f7774a97fc9676fb10f6f8e8a797b25b6711a7a8 |