Home

Awesome

PyPI release Downloads Coverage Linting Coding Style Documentation Status

Welcome to the django-pony-express - class-based emails for Django shipping with a full test suite.

Similar to class-based view in Django core, this package provides a neat, DRY and testable (!) way to handle your emails in Django.

Features

Etymology

The Pony Express was an American express mail service that used relays of horse-mounted riders. [...] During its 18 months of operation, the Pony Express reduced the time for messages to travel between the east and west US coast to about 10 days.

https://en.wikipedia.org/wiki/Pony_Express

The name of this package combines the Django mascot (a pony) with a once quite successful mail service in the US. Ingenious, right?

Installation

Contribute

Setup package for development

Add functionality

Run tests

Git hooks (via pre-commit)

We use pre-push hooks to ensure that only linted code reaches our remote repository and pipelines aren't triggered in vain.

To enable the configured pre-push hooks, you need to install pre-commit and run once:

pre-commit install -t pre-push -t pre-commit --install-hooks

This will permanently install the git hooks for both, frontend and backend, in your local .git/hooks folder. The hooks are configured in the .pre-commit-config.yaml.

You can check whether hooks work as intended using the run command:

pre-commit run [hook-id] [options]

Example: run single hook

pre-commit run ruff --all-files --hook-stage push

Example: run all hooks of pre-push stage

pre-commit run --all-files --hook-stage push

Update documentation

Translation files

If you have added custom text, make sure to wrap it in _() where _ is gettext_lazy (from django.utils.translation import gettext_lazy as _).

How to create translation file:

How to compile translation files:

Publish to ReadTheDocs.io

Publish to PyPi

Maintenance

Please note that this package supports the ambient-package-update. So you don't have to worry about the maintenance of this package. All important configuration and setup files are being rendered by this updater. It works similar to well-known updaters like pyupgrade or django-upgrade.

To run an update, refer to the documentation page of the "ambient-package-update".