Visualize Django models as an interactive ERD diagram in the browser
Project description
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.
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_lumen-0.2.2.tar.gz.
File metadata
- Download URL: django_lumen-0.2.2.tar.gz
- Upload date:
- Size: 47.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1cffcd12d87156e9279222a9d1424fb0b788c93f97cd77db35a80cb6431d9ef
|
|
| MD5 |
43412dbd9c919d4da87930c4e2fed22a
|
|
| BLAKE2b-256 |
2c2ac7f3f87e451deb74e68598e88ac6e9439bb720fb98de4a80d46b48f2deb7
|
File details
Details for the file django_lumen-0.2.2-py3-none-any.whl.
File metadata
- Download URL: django_lumen-0.2.2-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fa996790604a5f91939007883e0eaf18d00c7823580cd31c2120f4e5d8a4b9c
|
|
| MD5 |
bbe6339c2bfd69e557a8375fa9ed620d
|
|
| BLAKE2b-256 |
ca1337a904117f5699a0d4837ba88fad9261dc81ebc47d34e1e4115991329c8c
|