{"id":21149,"library":"django-markdownify","title":"django-markdownify","description":"Markdown template filter for Django using the Python Markdown library. The current version is 0.9.6, with a release cadence of roughly once per year. It provides a simple template filter to render Markdown text as HTML, with optional parameters for allowed tags, attributes, and extensions.","status":"active","version":"0.9.6","language":"python","source_language":"en","source_url":"https://github.com/erwinmatijsen/django-markdownify","tags":["django","markdown","template-filter","markdownify"],"install":[{"cmd":"pip install django-markdownify","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required for template filter integration","package":"Django","optional":false}],"imports":[{"note":"The module is within django_markdownify.templatetags, not directly importable as 'markdownify'","wrong":"from markdownify import markdownify","symbol":"markdownify","correct":"from django_markdownify.templatetags.markdownify import markdownify"},{"note":"Configure via settings.MARKDOWNIFY dictionary (not an import)","wrong":"","symbol":"MARKDOWNIFY","correct":"from django.conf import settings; settings.MARKDOWNIFY"}],"quickstart":{"code":"# 1. Install: pip install django-markdownify\n# 2. Add to INSTALLED_APPS:\nINSTALLED_APPS = [\n    ...\n    'django_markdownify',\n]\n\n# 3. In a template:\n{% load markdownify %}\n{{ text|markdownify }}\n\n# Optional settings:\nMARKDOWNIFY = {\n    \"default\": {\n        \"MARKDOWN_EXTENSIONS\": [\n            \"markdown.extensions.extra\",\n            \"markdown.extensions.codehilite\",\n        ],\n        \"STRIP\": False,\n        \"WHITELIST_TAGS\": [\"a\", \"code\", \"pre\"],\n        \"WHITELIST_ATTRS\": [\"href\", \"class\"],\n    }\n}","lang":"python","description":"Basic setup to use the markdownify filter in Django templates."},"warnings":[{"fix":"Use {% load markdownify %} in your templates.","message":"The template tag module is named 'markdownify' but the app is 'django_markdownify'. Always use {% load markdownify %} in templates.","severity":"gotcha","affected_versions":"all"},{"fix":"Remove 'safe' from filter usage and configure via MARKDOWNIFY settings.","message":"In version 0.9.0, the 'safe' argument was removed. Use 'strip' and whitelist options instead.","severity":"deprecated","affected_versions":">=0.9.0"},{"fix":"Replace {% load markdown %} with {% load markdownify %} and use {{ text|markdownify }}.","message":"Version 0.9.0 changed the filter name from 'markdown' to 'markdownify'. Templates using {% load markdown %} will break.","severity":"breaking","affected_versions":">=0.9.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Add 'django_markdownify' to INSTALLED_APPS and use {% load markdownify %} in templates.","cause":"Missing app in INSTALLED_APPS or using wrong template tag module name.","error":"TemplateSyntaxError: 'markdownify' is not a registered tag library. Must be one of: ..."},{"fix":"Ensure {% load markdownify %} is present in the template and the app is in INSTALLED_APPS.","cause":"Template tag module not loaded or filter not available.","error":"django.template.exceptions.TemplateSyntaxError: Invalid filter: 'markdownify'"},{"fix":"Import the filter via: from django_markdownify.templatetags.markdownify import markdownify","cause":"Incorrect import path in Python code (not a template).","error":"ImportError: cannot import name 'markdownify' from 'markdownify'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}