Simple and fast MJML rendering for Django templates.
Project description
Django MJML Template
Use MJML in your Django templates. A very small and fast implementation.
About
This package leverages MRML, a Rust implementation of MJML using bindings provided by mjml-python.
If you want to run MJML itself as a separate HTTP server endpoint for conversion, use django-mjml instead. It uses the same mjml template tag.
What is MJML?
From the documentation of the project:
MJML is a markup language designed to reduce the pain of coding a responsive email. Its semantic syntax makes it easy and straightforward and its rich standard components library speeds up your development time and lightens your email codebase. MJML’s open-source engine generates high quality responsive HTML compliant with best practices.
Requirements
- Python >= 3.7
- Django >= 1.11
Installation
To install the package, run the following command:
pip install django-mjml-template
Then update your settings.py:
INSTALLED_APPS = (
...
'django_mjml_template',
)
Usage
Load mjml in your django template and use mjml tag that will compile MJML to HTML:
{% load mjml %}
{% mjml %}
<mjml>
<mj-body>
<mj-section>
<mj-column>
<mj-text>Hello {{ user_name }}!</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>
{% endmjml %}
Contributions
Contributions, bug reports, and suggestions are welcome! Feel free to open an issue or submit a pull request.
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_mjml_template-1.0.0.tar.gz.
File metadata
- Download URL: django_mjml_template-1.0.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9f69b2610419d8414989f5f53415e9802901821d1e08f6a41a277ff83180815
|
|
| MD5 |
a62300330048c37d082043277bfffe31
|
|
| BLAKE2b-256 |
fdb7086ad5ad3a1ee1bd1465b4b727a2f0a2c72d6e8990f052fff6c039e17d7c
|
Provenance
The following attestation bundles were made for django_mjml_template-1.0.0.tar.gz:
Publisher:
ci.yml on Cruel/django-mjml-template
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_mjml_template-1.0.0.tar.gz -
Subject digest:
f9f69b2610419d8414989f5f53415e9802901821d1e08f6a41a277ff83180815 - Sigstore transparency entry: 361046253
- Sigstore integration time:
-
Permalink:
Cruel/django-mjml-template@7b010913f1eb45b5d189a9f0701f3d5b983b2c99 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Cruel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@7b010913f1eb45b5d189a9f0701f3d5b983b2c99 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_mjml_template-1.0.0-py3-none-any.whl.
File metadata
- Download URL: django_mjml_template-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bb50ea911dc5edcad14d8a82c5624591a664d9de44cc4b1815a2d43934830a5
|
|
| MD5 |
15c215a1bf3bbfa0ca4573d8300bedbb
|
|
| BLAKE2b-256 |
165fa80d832c6c8c239859313f30bb86e0184c0d31be4ccf4f7a6882f54e4730
|
Provenance
The following attestation bundles were made for django_mjml_template-1.0.0-py3-none-any.whl:
Publisher:
ci.yml on Cruel/django-mjml-template
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_mjml_template-1.0.0-py3-none-any.whl -
Subject digest:
9bb50ea911dc5edcad14d8a82c5624591a664d9de44cc4b1815a2d43934830a5 - Sigstore transparency entry: 361046278
- Sigstore integration time:
-
Permalink:
Cruel/django-mjml-template@7b010913f1eb45b5d189a9f0701f3d5b983b2c99 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Cruel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@7b010913f1eb45b5d189a9f0701f3d5b983b2c99 -
Trigger Event:
push
-
Statement type: