django-lumen
Visualize your Django models as an interactive ERD diagram in the browser. No external diagram library — the diagram is pure vanilla JS + SVG rendered at request time from the live Django model registry.
Requirements
- Python 3.10+
- Django 3.2+
Installation
pip install django-lumen
Setup
- Add
django_lumentoINSTALLED_APPS:
# settings.py
INSTALLED_APPS = [
...
"django_lumen",
]
- Mount the URLs in your root
urls.py:
# urls.py
from django.urls import path, include
urlpatterns = [
...
path("lumen/", include("django_lumen.urls")),
]
- Run migrations:
python manage.py migrate
- Start the development server and open http://localhost:8000/lumen/.
Access control
The diagram is only accessible to users with is_active = True and is_staff = True. Other users are redirected to the login page.
App filter
The sidebar lists every app present in the diagram. Clicking an app name filters the diagram to show only models belonging to that app plus any models they have direct relations to. Click again to deselect. Multiple apps can be selected at once — when no app is selected, all models are shown.
Right-clicking an app name marks it as excluded (shown in red with strikethrough). Excluded apps are completely hidden from the diagram and the preference is saved automatically. Right-click again to un-exclude.
Settings
Each staff user has their own saved preferences, accessible via the Settings link in the diagram header. The settings page provides three sections:
Managed tables — when enabled, models with managed = False in their Meta class are hidden from the diagram.
Show inheritance — when enabled, each model box displays its parent class(es) below the model name. The default Django base (models.Model) is not shown — only custom application-level parents are displayed.
Excluded models — a list of regex patterns matched against model names. Any model whose name matches at least one pattern is hidden. Patterns use Python re.search, so use ^/$ to anchor. Examples: ^Historical, Log$, Audit.
Excluded apps — checkboxes to permanently hide entire apps from the diagram. The following apps are hidden by default: auth, admin, sessions, contenttypes, django_lumen. Users can also right-click an app chip in the sidebar to exclude it directly from the diagram view.
Release files for django-lumen 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_lumen-0.2.3.tar.gz | 61.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_lumen-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 88.4 kB
Release files / django_lumen-0.2.3.tar.gz
| Download URL | django_lumen-0.2.3.tar.gz |
|---|---|
| Size | 61.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8dbd4849fead95ebbf49867b89b818b7caba71daab26ed5c4e69432bdad62489
|
|
BLAKE2b-256 checksum How to use checksums |
a5319f0c31a3b56f7563562ca6cd8b96ef464aa5d4c523e3ca66172c963dda0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.5 cpython/3.14.3 HTTPX/0.28.1
|
Release files / django_lumen-0.2.3-py3-none-any.whl
| Download URL | django_lumen-0.2.3-py3-none-any.whl |
|---|---|
| Size | 27.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76dc8b7f961ebc91f5c1a76e1d13d6e397a3fbb856d09536e9cb11b2cc1ecf5b
|
|
BLAKE2b-256 checksum How to use checksums |
67aaabfa0a97882782c752fef379fc02fd2b06d7d2b5a76c150304ead9fb527f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.5 cpython/3.14.3 HTTPX/0.28.1
|