Skip to main content

CI pypi

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 MRML's official Python bindings.

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_mjml_template-1.0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_mjml_template-1.0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file django_mjml_template-1.0.1.tar.gz.

File metadata

  • Download URL: django_mjml_template-1.0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for django_mjml_template-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6308429d172b41539cc77f56be9018f8ec9cfdfcc88b178ce53e1390d0a70219
MD5 77689b9186b9f6dfe962d80b8c13aa07
BLAKE2b-256 ec2ab17c8baa989cc157f095c5fdcc8fefe4e087f9dfebc2694f8300c78c38de

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_mjml_template-1.0.1.tar.gz:

Publisher: ci.yml on Cruel/django-mjml-template

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_mjml_template-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_mjml_template-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b1e93798af8db07754da9d4cc5e1e8d0dc7a2b34c2dbe8e397b9c1caf0c3649
MD5 023d2c99ce7b85e1481c782192298932
BLAKE2b-256 76654f50780c85ec6ee1846a79e0b4a75a4bc4fa619e203ff602f4e671a2f543

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_mjml_template-1.0.1-py3-none-any.whl:

Publisher: ci.yml on Cruel/django-mjml-template

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page