Skip to main content

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

  1. Add it to your Environment using:

    pip install django-proemail-template django-summernote
  2. Add “django-email-template” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'django_summernote'#required
        'EmailTemplate',
    ]
  3. Run python manage.py migrate to create the polls models.

  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-proemail-template-0.2.6.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

django_proemail_template-0.2.6-py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 3

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