skip to navigation
skip to content

django-mail-dbtpl 0.2

A simple Django app to store email template in database.

Latest Version: 0.2.2


The application allows you to store email templates in the database. The application also allows you to edit templates in the database data using ``ckeditor``. More details about the settings available ``ckeditor <https:"" shaunsephton="" django-ckeditor="">`_.

Install the application using pip.

> pip install django-mail-dbtpl

Add application settings Django project


Apply migration

python ./ migrate django_mail_dbtpl

After installation, you must create a letter template in the database via the administration panel by url ````, it is necessary for the template specify `` slug ``. `` slug `` will be used for both identifier template. The templates can be determined context variables `` {{var}} ``. For example, you create a template with `` slug = 'welcome.tpl' ``, `` subject = 'Welcome, {{username}}' ``, `` body = 'Welcome to the {{site}}.'. The following is the code that shows how to use the template stored in the database

from django_mail_dbtpl.utils import EmailWrapper
context = {
'username': 'Example User',
'site': ''
msg = EmailWrapper('welcome.tpl', context)
msg.from_email = '' = ['']
File Type Py Version Uploaded on Size
django-mail-dbtpl-0.2.tar.gz (md5) Source 2014-06-15 2KB