{"id":21150,"library":"django-markdownx","title":"django-markdownx","description":"A comprehensive Markdown editor plugin for Django, providing a side-by-side live preview, image uploads with drag-and-drop, and custom markdown extensions. The latest version is 4.0.9. Release cadence is irregular.","status":"active","version":"4.0.9","language":"python","source_language":"en","source_url":"https://github.com/neutronX/django-markdownx","tags":["django","markdown","editor","admin"],"install":[{"cmd":"pip install django-markdownx","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Required for image processing (uploaded images)","package":"Pillow","optional":false},{"reason":"The core markdown rendering library","package":"Markdown","optional":false}],"imports":[{"note":"Correct class name changed; old name was deprecated.","wrong":"from markdownx.models import MarkdownxField","symbol":"MarkdownxModelField","correct":"from markdownx.models import MarkdownxModelField"}],"quickstart":{"code":"# 1. Add 'markdownx' to INSTALLED_APPS\n# 2. In models.py:\nfrom django.db import models\nfrom markdownx.models import MarkdownxModelField\n\nclass MyModel(models.Model):\n    content = MarkdownxModelField()\n\n# 3. In admin.py:\nfrom django.contrib import admin\nfrom markdownx.admin import MarkdownxModelAdmin\nfrom .models import MyModel\n\nadmin.site.register(MyModel, MarkdownxModelAdmin)\n\n# 4. Run migrations, then include markdownx URLs:\n# path('markdownx/', include('markdownx.urls'))","lang":"python","description":"Basic setup: model with MarkdownxModelField, admin integration, and URL inclusion."},"warnings":[{"fix":"Replace 'from markdownx.models import MarkdownxField' with 'from markdownx.models import MarkdownxModelField'.","message":"In v4.0.0, the model field class was renamed from 'MarkdownxField' to 'MarkdownxModelField'. Existing code using the old import will break.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Define a function in a separate module and reference it as 'mymodule.myfunc'.","message":"The 'MARKDOWNX_MARKDOWNIFY_FUNCTION' setting must be a string path to a callable, not a lambda or imported object, due to serialization requirements.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install django-markdownx' and add 'markdownx' to INSTALLED_APPS in settings.py.","cause":"Library not installed or not added to INSTALLED_APPS after installation.","error":"ModuleNotFoundError: No module named 'markdownx'"},{"fix":"Ensure you register the model with 'MarkdownxModelAdmin' as shown: admin.site.register(ModelName, MarkdownxModelAdmin).","cause":"Using 'MarkdownxModelAdmin' incorrectly or custom admin not calling super with proper arguments.","error":"TypeError: __init__() missing 1 required positional argument: 'model_field'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}