option of attaching an HTML formatted alternative.
Installation
=============
Installing::
pip install django-email-templates
Example usage
==============
The following example demonstrates how to send a templated email, in this case
the user has submitted a contact form. The module will look for the templates
contact.txt and contact.html which will serve as the plaintext and html alternative
of the email. The default location of the templates is a directory named *email_templates*.::
from email_templates import send_templated_mail
context = {
'name': request.POST['name'],
'email': request.POST['email'],
'telephone': request.POST['phone'],
'message': request.POST['message'],
}
success = send_templated_mail(
'Contact form submission',
None,
[a[1] for a in settings.ADMINS],
'contact',
context
)
Metadata
Release files for django-email-templates 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-email-templates-0.1.tar.gz | 3.4 kB | Without provenance | Details for django-email-templates-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_email_templates-0.1-py2.6.egg | Legacy Egg format | - | - | Details for django_email_templates-0.1-py2.6.egg |
Total release size: 7.4 kB
Release files / django-email-templates-0.1.tar.gz
| Download URL | django-email-templates-0.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d9128c33f87bfb2a3afb95c50f06df1e48fd7512827b12fb6f1b28de01bb271
|
|
BLAKE2b-256 checksum How to use checksums |
b8a864e02af34e2ba6425b2c5bf13b2d92d7bfe3f4d3855fdee419b070aec4cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_email_templates-0.1-py2.6.egg
| Download URL | django_email_templates-0.1-py2.6.egg |
|---|---|
| Size | 4.0 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
6c5e7ba9c72b0b2d9d831a97993b4c810a67bf6ba85a6bd907c92309c2280e41
|
|
BLAKE2b-256 checksum How to use checksums |
136afa697d66f7894eeb709505cc73d4b28d048ba96df1f333e706941f9fa2a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-email-templates 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.