Skip to main content

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 list
  • NEWSLETTER_FORM_FIELD_PLACEHOLDERS allows the user to customise the field placeholder text. This must be a dict containing the fieldnames
  • NEWSLETTER_FORM_REQUIRED_FIELDS allows the user to customise what fields are required on the form. This must be a list
  • NEWSLETTER_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 label
  • NEWSLETTER_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
  • NEWSLETTER_HTTP_REFERER allows the user to customise the success url and return the user to the referer page after submission

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

giant_newsletter-0.3.5.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

giant_newsletter-0.3.5-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file giant_newsletter-0.3.5.tar.gz.

File metadata

  • Download URL: giant_newsletter-0.3.5.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.11.3 Darwin/22.4.0

File hashes

Hashes for giant_newsletter-0.3.5.tar.gz
Algorithm Hash digest
SHA256 98dbec7c67d965d5bd719d2aa7e5b378df5f933a0ac3d6d0e8a783391980e60e
MD5 c926de92559d9f78734d66adfae9cf56
BLAKE2b-256 7da337aea2869a78f01cc5c468ffd7b56cd1f480e50c8057cce9beda6420135b

See more details on using hashes here.

File details

Details for the file giant_newsletter-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for giant_newsletter-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f94056a6f669725164e9d7e0224043b1685d8a9f647bcbe45ab564673970f41a
MD5 7cd6a177ad7e4c12f7f47ee0e8ec9d48
BLAKE2b-256 a97fd0ead5c2f00d42768e5c633e7d2e3aced8e55519fe81b31775bdd62ce5ee

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page