Use MJML in Django templates
Project description
django-mjml
The simplest way to use MJML in Django templates.
Installation
Requirements:
Django v1.9+
mjml v2.0+
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:
{% load mjml %} {% mjml %} <mjml> <mj-body> <mj-container> <mj-section> <mj-column> <mj-text>Hello world!</mj-text> </mj-column> </mj-section> </mj-container> </mj-body> </mjml> {% 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 Distribution
Close
Hashes for django_mjml-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf0c5243ba05877cb77cfa7c5f4a3d21602469cad899a4c637017eb0edfe7419 |
|
MD5 | 0e6cc8d2680bcf386b9ac5674bf61f79 |
|
BLAKE2b-256 | 89fa9c34956ead0010883bb123178194217e261fd296dbd6c54f53ebe9e5cc22 |