django-mjml
Use MJML in Django templates
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and solves a real problem—writing responsive emails is tedious without a markup language designed for it. Use it if you need to generate HTML emails in Django and want to avoid hand-coding complex table layouts. The multiple rendering backends let you start simple and scale later.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires mjml (version 4.14.1 to 4.17.2) to be installed separately on the system; see https://github.com/mjmlio/mjml#installation.
- Optionally requires requests (2.24.0+) for HTTP-server rendering mode.
- Low friction installation with a single runtime dependency (django).
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you retain the license notice.
last release 2025-12-07 (250 days) · last repo commit 2026-08-14 · 284 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 101,269 downloads/mo, #12,949 on PyPI
Alternatives
Verify before relying
pip install django-mjml
# In settings.py:
INSTALLED_APPS = (..., 'mjml')
# In template:
{% load mjml %}
{% mjml %}
<mj-body>
<mj-section>
<mj-column>
<mj-text>Hello world!</mj-text>
</mj-column>
</mj-section>
</mj-body>
{% endmjml %}- Whether the package's three backend modes (cmd, tcpserver, httpserver) have measurable performance differences in production workloads.
- Whether MJML_CHECK_CMD_ON_STARTUP=False actually provides meaningful startup speedup in typical deployments.
- Compatibility testing status with Django 6.0 (listed as supported but package last released 2025-12-07).
What it is and what it does
django-mjml is a Django app that lets you write responsive email templates using MJML (Mailjet Markup Language) directly in your Django templates. Instead of hand-coding complex HTML email layouts, you write simpler MJML markup and the package compiles it to production-ready HTML at render time. It acts as a bridge between Django's template system and the MJML compiler, handling the compilation process transparently.
The package supports three rendering backends: a simple command-line mode (default, slower), a faster TCP-server mode for high-volume rendering, and an HTTP-server mode that can use the official MJML API or your own HTTP server. You configure which backend to use in Django settings, and the template tag remains the same. It requires Django 2.2 to 6.0 and Python 3.9+, with no other mandatory runtime dependencies beyond django itself.
Use it for
- Render responsive email templates in Django views without writing raw HTML table layouts.
- Build reusable MJML email components as Django template includes for consistent branding across transactional emails.
- Scale email rendering by switching from cmd mode to tcpserver or httpserver mode as volume grows.
- Integrate MJML templates into Django's email backend for automated password-reset and notification emails.
- Validate email HTML output during development by leveraging MJML's built-in validation and minification options.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, carries no known vulnerabilities, and solves a real problem—writing responsive emails is tedious without a markup language designed for it. Use it if you need to generate HTML emails in Django and want to avoid hand-coding complex table layouts. The multiple rendering backends let you start simple and scale later.
Install
django-mjml on PyPI
Before you install
Low friction installation with a single runtime dependency (django). Actively maintained with recent releases; last commit 2026-08-14. Requires external mjml installation and optionally requests library for HTTP-server mode.
Requires mjml (version 4.14.1 to 4.17.2) to be installed separately on the system; see https://github.com/mjmlio/mjml#installation. Optionally requires requests (2.24.0+) for HTTP-server rendering mode.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you retain the license notice.
Quickstart
pip install django-mjml
# In settings.py:
INSTALLED_APPS = (..., 'mjml')
# In template:
{% load mjml %}
{% mjml %}
<mj-body>
<mj-section>
<mj-column>
<mj-text>Hello world!</mj-text>
</mj-column>
</mj-section>
</mj-body>
{% endmjml %}
Verify before relying
- Whether the package's three backend modes (cmd, tcpserver, httpserver) have measurable performance differences in production workloads.
- Whether MJML_CHECK_CMD_ON_STARTUP=False actually provides meaningful startup speedup in typical deployments.
- Compatibility testing status with Django 6.0 (listed as supported but package last released 2025-12-07).
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagedjango |
| Maintenance | Actively maintained 250 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 101,269 / month, #12,949 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python Modules |
Evidence: django_mjml-1.5-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django mjml template tag”
- django-mjmlProvides a Django template tag that compiles MJML (Mailjet Markup…
- mjml-pythonCompiles MJML email templates to HTML at runtime using an embedded…
- mjmlConverts MJML (a markup language for responsive emails) to HTML…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also mjml · mjml-python · mrml · django-render-block · django-debug-toolbar-template-timings · Mako · html5tagger · django-debug-toolbar-template-profiler · django-templated-mail · cmarkgfm