{"id":23581,"library":"django-mjml","title":"django-mjml","description":"Django integration for MJML, the responsive email framework. Currently at v1.5, supports Django 6.0 and Python >=3.9. Release cadence is irregular, roughly yearly updates.","status":"active","version":"1.5","language":"python","source_language":"en","source_url":"https://github.com/liminspace/django-mjml","tags":["django","mjml","email","templates"],"install":[{"cmd":"pip install django-mjml","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Used for HTTP API mode to send MJML rendering requests to a server","package":"requests","optional":true}],"imports":[{"note":"No common mistake; the package is imported as django_mjml.","wrong":"","symbol":"mjml","correct":"from django_mjml import mjml"}],"quickstart":{"code":"# settings.py\nINSTALLED_APPS = [\n    ...\n    'django_mjml',\n]\n\nMJML_BACKEND_MODE = 'cmd'  # or 'http' or 'tcp'\nMJML_EXEC_CMD = 'mjml'  # local node mjml command\n\n# In your template:\n{% load mjml %}\n{% mjml %}\n<mjml>\n  <mj-body>\n    <mj-section>\n      <mj-column>\n        <mj-text>Hello {{ name }}!</mj-text>\n      </mj-column>\n    </mj-section>\n  </mj-body>\n</mjml>\n{% endmjml %}","lang":"python","description":"Basic setup: add 'django_mjml' to INSTALLED_APPS, configure backend, and use the mjml template tag."},"warnings":[{"fix":"Upgrade to Python >=3.9 and Django >=3.2 (current minimums). If you relied on the bundled TCP server, migrate to https://github.com/danihodovic/mjml-server.","message":"Version 1.0 dropped support for Python 2.7 and Django versions older than 2.2. Also moved MJML TCP-Server to a separate repository.","severity":"breaking","affected_versions":">=1.0"},{"fix":"Ensure your Python version is >=3.9 and your MJML binary is at least 4.14.1.","message":"In v1.5, Python 3.6, 3.7, and 3.8 are no longer supported. Also MJML versions older than 4.14.1 have been removed from tests.","severity":"breaking","affected_versions":">=1.5"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install django-mjml' and add 'django_mjml' (not 'django-mjml') to INSTALLED_APPS.","cause":"django-mjml not installed or INSTALLED_APPS entry is incorrect.","error":"ModuleNotFoundError: No module named 'django_mjml'"},{"fix":"Add 'django_mjml' to INSTALLED_APPS and use '{% load mjml %}' at the top of your template.","cause":"The template tag library is not loaded or the app is not in INSTALLED_APPS.","error":"TemplateSyntaxError: 'mjml' is not a registered tag library. Must be one of: ..."},{"fix":"Ensure the MJML server (from the separate repo) is started, or switch to 'cmd' mode with a locally installed mjml binary.","cause":"Using MJML_BACKEND_MODE='tcp' but the MJML TCP server is not running.","error":"ConnectionRefusedError: [Errno 61] Connection refused"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}