Render Markdown documentation directly in the Django admin`.
- Support for nested subfolders
- Comprehensive Markdown format (link to which spec)
- Provides default styles for Markdown rendering
-
Install the
django-actual-admin-docs
package. If you havepygments
installed, code blocks are automatically highlighted. -
Add
actual_admin_docs
to yourINSTALLED_APPS
setting:INSTALLED_APPS = [ "django.contrib.admin", "actual_admin_docs", ... ]
-
Add the documentation urlpattern, above your admin urls:
from django.contrib import admin from django.urls import include, path urlpatterns = [ path("admin/docs/", include("actual_admin_docs.urls")), path("admin/", admin.site.urls), ]
-
Add a
DOCS_ROOT
setting which should be apathlib.Path
pointing to the docs directory:DOCS_ROOT = BASE_DIR / "docs"
You can use folders, subfolders, files in folders, etc.
🗂 docs/
│
├── 🗂 subfolder
│ │
│ ├── 🗂 subfolder with spaces
│ │ └── 📝 another-file.md
│ │
│ ├── 📝 another-file.md
│ └── 📝 index.md
│
├── 🗂 img
│ └── 🌁 cat_studying_glasses.jpg
│
├── 📝 index.md
└── 📝 markdown-sample.md
Use regular Markdown links to link to other documents or objects:
A link to [another document](./markdown-sample.md) is just a regular Markdown link. Documents in subdirectories [are supported too](./subfolder/another-file.md).
For images, downloads etc. use regular markdown markup too:

[Click to download](./img/./img/cat_studying_glasses.jpg)
Overwrite the actual-admin-docs.css
file to add your custom styles.
$ poetry install
$ poetry run pytest
$ DJANGO_SETTINGS_MODULE=actual_admin_docs.tests.testproject.settings poetry run django-admin runserver