Skip to content

skioo/django-templates-email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-templates-email

Build Status PyPI version Requirements Status License: MIT

Generates the content needed to send a transactional email, based on a template:

The template should contains two blocks: "subject" and "html". The "html" block should contain a full html document, with internal CSS styles in the tag. When the template gets merged the CSS styles are automatically inlined.

A plaintext version of the html is automatically generated from the html (some email readers choose to display the plaintext).

Requirements

  • Python: 3.6 and over
  • Django: 2.0 and over

Possible enhancement

  • Right now css inlining is applied each time an email is merged (and this takes time). It would be better to 'pre-inline' once the basic html structure, and do the repetitive merges on that pre-inlined base.

One approach for implementation would be a custom 'css inlining' template loader. Another would be a custom template tag that inlines during the compilation phase: https://docs.djangoproject.com/en/1.11/howto/custom-template-tags/#a-quick-overview

References

To work on this code

pip install -e .

To run tests:

tox

To release a version to pypi:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published