Interactive schema visualization for Django projects — React Flow + force-directed layout
Project description
django-schematic
Interactive schema visualization for Django projects.
See all your models, fields, and relationships as an interactive, force-directed graph — directly in your browser. Zero Node.js required at runtime.
Features
- Force-directed layout with physics settle animation (drag-to-pin support)
- Hierarchical layout via dagre
- Click to expand/collapse field lists per model
- App-based color coding
- Show/hide models and apps via sidebar
- Export/import view state as JSON
- Export diagram as PNG
- Clean JSON API endpoint (
GET /schema/api/) - Django 5.x + Python 3.12+ only
Screenshots
Quick Start
pip install django-schematic
Add to INSTALLED_APPS:
INSTALLED_APPS = [
...
"schematic",
]
Add to urls.py:
from django.urls import include, path
urlpatterns = [
...
path("schema/", include("schematic.urls")),
]
Visit http://localhost:8000/schema/ — your model graph will be there.
Security
The viewer is only accessible when DEBUG = True. In production (DEBUG = False) both the HTML view and the API return 404, making the URL appear non-existent.
To expose the viewer in production behind your own auth layer, set the visible option to a callable:
SCHEMATIC = {
"visible": lambda request: request.user.is_staff,
}
Configuration
# settings.py (all optional — these are the defaults)
SCHEMATIC = {
"visible": lambda request: settings.DEBUG, # or any callable, or True/False
"include_apps": [], # empty = all apps
"exclude_apps": ["admin", "contenttypes", "sessions", "auth"],
"exclude_models": {}, # {"myapp": ["InternalModel"]}
"include_abstract": False,
"include_proxy": True,
}
API
The schema is also available as JSON:
GET /schema/api/
GET /schema/api/?apps=myapp,otherapp
Development
# Backend
pip install -e ".[dev]"
pytest
# Frontend
cd ui
npm install
npm run dev # Vite dev server with HMR
npm run build # Outputs to schematic/static/schematic/
License
MIT
Project details
Release history Release notifications | RSS feed
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_schematic-1.0.4.tar.gz.
File metadata
- Download URL: django_schematic-1.0.4.tar.gz
- Upload date:
- Size: 596.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c8e71986688aadf90d665c28032adc0fa6d1349b986ea767f1829170e05b917
|
|
| MD5 |
c805ece9bebcc2eec9426bf7f12d5752
|
|
| BLAKE2b-256 |
9bce513c4b097a2bef5a32cdccb98573e98fb8fbf974ad9005470948f9e8d9cb
|
Provenance
The following attestation bundles were made for django_schematic-1.0.4.tar.gz:
Publisher:
release.yml on jsheffie/django-schematic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_schematic-1.0.4.tar.gz -
Subject digest:
0c8e71986688aadf90d665c28032adc0fa6d1349b986ea767f1829170e05b917 - Sigstore transparency entry: 1294959362
- Sigstore integration time:
-
Permalink:
jsheffie/django-schematic@ea6838d913d947b77dd940249f2a4354590d4c7d -
Branch / Tag:
refs/tags/v1.0.4 - Owner: https://github.com/jsheffie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ea6838d913d947b77dd940249f2a4354590d4c7d -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_schematic-1.0.4-py3-none-any.whl.
File metadata
- Download URL: django_schematic-1.0.4-py3-none-any.whl
- Upload date:
- Size: 601.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e8402c2e13472e86ddf7116cb40e57f953d3f04853802f0dec223d99de8a46e
|
|
| MD5 |
54243311c2db30846082bab36ea29e70
|
|
| BLAKE2b-256 |
d1237337fc4e873ecdfbf1a60d7f169aecf796b577ff417f35a5a7e901615af7
|
Provenance
The following attestation bundles were made for django_schematic-1.0.4-py3-none-any.whl:
Publisher:
release.yml on jsheffie/django-schematic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_schematic-1.0.4-py3-none-any.whl -
Subject digest:
5e8402c2e13472e86ddf7116cb40e57f953d3f04853802f0dec223d99de8a46e - Sigstore transparency entry: 1294959498
- Sigstore integration time:
-
Permalink:
jsheffie/django-schematic@ea6838d913d947b77dd940249f2a4354590d4c7d -
Branch / Tag:
refs/tags/v1.0.4 - Owner: https://github.com/jsheffie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ea6838d913d947b77dd940249f2a4354590d4c7d -
Trigger Event:
push
-
Statement type: