Skip to main content

A reusable Django app, that handles newsletter subscriptions.

Installation

To get the latest stable release from PyPi

pip install django-newsletter-signup

To get the latest commit from GitHub

pip install -e git+git://github.com/bitmazk/django-newsletter-signup.git#egg=newsletter_signup

Add newsletter_signup to your INSTALLED_APPS

INSTALLED_APPS = (
    ...,
    'newsletter_signup',
)

Add the newsletter_signup URLs to your urls.py

urlpatterns = patterns('',
    ...
    url(r'^newsletter/', include('newsletter_signup.urls')),
)

Don’t forget to migrate your database

./manage.py migrate newsletter_signup

Usage

Just link to the signup page or fetch it’s contents via AJAX into e.g. a bootstrap modal. Once a user fills out the subscription form she gets a verification email, that on click makes the Subscription verified.

Future updates might include mailchimp integration to have everything setup right away. For now you then need to gather the emails from the admin or your own custom management views that you want to send mails to, or alternatively create a custom management command.

Settings

NEWSLETTER_SIGNUP_FROM_EMAIL

To set the from email in the mails, you can either specifically set the NEWSLETTER_SIGNUP_FROM_EMAIL setting or only the FROM_EMAIL setting, which it per default falls back to.

..code-block:: python

NEWSLETTER_SIGNUP_FROM_EMAIL = ‘news@example.com’

NEWSLETTER_SIGNUP_SUBSCRIBE_SUBJECT and NEWSLETTER_SIGNUP_UNSUBSCRIBE_SUBJECT

Both of these setting work in the same way as they set the email subject for the subscripe and unsubscribe email. You can either provide a string or a callable object receiving the subscription object as a parameter. See models.py for details. Alternatively you could overwrite those two templates email/unsubscripe_subject.html and email/subscripe_subject.html.

..code-block:: python

SUBSCRIBE_SUBJECT = ‘Your subscription to our newsletter!’

UNSUBSCRIBE_SUBJECT = lambda sub: ‘{0} was unsubscribed.’.format(

sub.email)

Contribute

If you want to contribute to this project, please perform the following steps

# Fork this repository
# Clone your fork
mkvirtualenv -p python2.7 django-newsletter-signup
make develop

git co -b feature_branch master
# Implement your feature and tests
git add . && git commit
git push -u origin feature_branch
# Send us a pull request for your feature branch

Metadata

Release files for django-newsletter-signup 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-newsletter-signup 0.1
File Size Uploaded Provenance
django-newsletter-signup-0.1.tar.gz 12.5 kB Without provenance Details

Release files / django-newsletter-signup-0.1.tar.gz

Download URL django-newsletter-signup-0.1.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9712d4b3dff62923a49171ddbb335a3f6ead44aaa37c9e46921ec1366042b8c2
BLAKE2b-256 checksum
How to use checksums
9ea03dcbe45cfcd9fdceeb7589dcd9faef20217f368c110ca986ebcbb5558045
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-newsletter-signup 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page