A collection of Django email tools
Project description
Django Email Tools
Requirements
- Python 3.6+
- Django 2.2+
Installation
Install with pip pip install django-email-tools
Add email_tools
to INSTALLED_APPS
INSTALLED_APPS = (
...
'email_tools.apps.EmailToolsConfig',
...
)
Add something like the following to urls.py
if settings.DEBUG:
urlpatterns = [
path("emailpreview/", include("email_tools.urls", namespace="email_tools")),
] + urlpatterns
Documentation
All settings are handled within a EMAIL_TOOLS
dictionary.
Example:
PLATFORM_ACCOUNTS = {
'FROM_EMAIL': 'example@example.com',
'TEMPLATE_DIRECTORY': os.path.join(settings.BASE_DIR, "templates", "emails"),
}
The available settings are:
FROM_EMAIL
the email to send from.
TEMPLATE_DIRECTORY
the path to a directory containing .html
files used in emails.
Usage
Django Email Tools contains two main parts.
First, is email_tools.emails.send_email
a utility to send html emails given a django template and context.
The second is a debugging page that allows you to see what the rendered result of an email template would look like. This page also allows you to get a list of variables used by the template and modify those variables and see results in real-time.
Changelog
See CHANGELOG.md
License
See LICENSE
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 django_email_tools-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08781bbb6a828352489d5945a734c0143b80b61160ecbf079f95c272a9a93437 |
|
MD5 | e4a0ea72a27d2303cf720c6cc9beb571 |
|
BLAKE2b-256 | 4e06941f4a6f5665d38240be78d086e3ca1b38fd1fbff1d2fde34b4028936973 |