The simplest way to use MJML in Django templates.
Project description
django-mjml
The simplest way to use MJML in Django templates.
Installation
Requirements:
Django v1.9+
mjml v1.3.4+
1. Install mjml.
See https://github.com/mjmlio/mjml#installation and https://mjml.io/documentation/#installation
2. Install django-mjml.
Via pip:
$ pip install django-mjml
Via setuptools:
$ easy_install django-mjml
For install development version use git+https://github.com/liminspace/django-mjml.git@develop instead django-mjml.
3. Set up settings.py in your django project.
INSTALLED_APPS = ( ..., 'mjml', )
Usage
Load mjml in your django template and use mjml tag that will compile mjml to html:
[email_template.html] {% load mjml %} {% mjml %} <mj-body> <mj-section> <mj-column> <mj-text>Hello world!</mj-text> </mj-column> </mj-section> </mj-body> {% endmjml %}
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for django_mjml-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd085840547be91d92a2ad3e58a8a39b3c20703f776fcbf547e6f58df465646e |
|
MD5 | 0e71b917f14a50e4765d0f5892995153 |
|
BLAKE2b-256 | 6263fbd66fd542827c5ba8cd4f6d8a21abd85c1069e9907f75f68aded5920134 |
Close
Hashes for django_mjml-0.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2352518a10ffbeb5e8c8dc793df8ead2c2255245ba5985910c2cb2c41030325 |
|
MD5 | 2459379d39d0f77790b96c498563ae1b |
|
BLAKE2b-256 | 424568f14489958ad8867a47e6a0f2f3e2f7b0deacf83d37c4949bafca08e427 |