A simple Django app to send emails
Project description
A few months ago, I ran into this post https://blog.anvileight.com/posts/django-email-templates-with-context-stored-in-database/ and decided to make it into a lib after using it on one of my projects
Quick start
Add it to your Environment using:
pip install django-proemail-template django-summernote
Add “django-email-template” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'django_summernote'#required 'EmailTemplate', ]
Run python manage.py migrate to create the polls models.
add url for summernote:
path('summernote/', include('django_summernote.urls')),
You should see it under admin
How to use it
Create a new template on admin called default, setting the required info. Use “object” as the context to access the variables (like on a view).
And send it from any code:
EmailTemplate.send('default', { 'object': your_model_instance, })
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
File details
Details for the file django-proemail-template-0.2.6.tar.gz
.
File metadata
- Download URL: django-proemail-template-0.2.6.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | efce4d4ae8d895b659f5d4ee3d42630948b17638e268629e3498cec1dab985fb |
|
MD5 | ca02de52c99b61228f8d01ad5de2e035 |
|
BLAKE2b-256 | 3be3a6d544dee95b789397f54ac79811ce0acad52f4909159842bd84d884838a |
File details
Details for the file django_proemail_template-0.2.6-py3-none-any.whl
.
File metadata
- Download URL: django_proemail_template-0.2.6-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89de4ef1088f2c6646c707935d4486283106dd2d80a605d2e99bd2d04de84477 |
|
MD5 | 5cdafdc91a8d5fc0ea1db98ee85c4f7a |
|
BLAKE2b-256 | 3dd0918450cacb16d3a448bef20a90f8d343f04146f3c869b752740fee7c2d70 |