An interactive graph of your Django model structure.
Project description
Django Schema Graph
Django-schema-graph makes a colourful diagram out of your Django models. The diagram is interactive, and makes it easy to toggle models and apps on/off at will.
It looks like this:
Feature | Screenshot |
---|---|
Models | |
Apps | |
Both together | |
Graph editor |
(Apologies that the images above don't work on PyPI. Check it out on GitHub.)
Installation
Install from PyPI:
pip install django-schema-graph
Add to INSTALLED_APPS
:
INSTALLED_APPS = [
...
'schema_graph',
...
]
Add to your URLs.
from schema_graph.views import Schema
urlpatterns += [
# On Django 2+:
path("schema/", Schema.as_view()),
# Or, on Django < 2:
url(r"^schema/$", Schema.as_view()),
]
Use
Browse to /schema/
(assuming that's where you put it in your URLs).
You can control access to this page using the SCHEMA_GRAPH_VISIBLE
setting,
or by subclassing schema_graph.views.Schema
and overriding access_permitted
.
By default the page is only visible when DEBUG
is True
,
because we assume that you don't want to leak sensitive information about your
website outside of local development.
Support
Tests run on sensible combinations of:
- Python (3.10-3.11)
- Django (3.2-4.1)
If you're stuck on old version of Python or Django, you may consider installing old versions. They will probably have fewer features, and there will be no support for them.
The last version to support Python 2.7 and 3.5 was 1.2.0. The last version to support Python 3.6 to 3.9 was 2.2.1.
The last version to support Django 1.8 was 1.2.0. The last version to support Django 1.9 to 3.1 was 2.2.1.
Alternatives
django-spaghetti-and-meatballs
is great. At the time of writing, it offers a lot more detailed information on the models in the diagram, but doesn't allow them to be turned on/off in the page.
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
File details
Details for the file django_schema_graph-3.0.0.tar.gz
.
File metadata
- Download URL: django_schema_graph-3.0.0.tar.gz
- Upload date:
- Size: 322.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1037-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17261920d40fd4a216d8199c0fda82f3e215da670cfebd3835b294014e16b23b |
|
MD5 | f70e08bdd4d9849d1d542ef3877882bb |
|
BLAKE2b-256 | b79f38f3bd3ffd23a1fd7fcbdbfd4aa25ed1ec17e49b3e8b92c9cbbc19f3b05d |
File details
Details for the file django_schema_graph-3.0.0-py3-none-any.whl
.
File metadata
- Download URL: django_schema_graph-3.0.0-py3-none-any.whl
- Upload date:
- Size: 324.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1037-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d566a6b0028e6a3f5120979b016c62c24136ed16cc743dd1e9bd021c7d5ab9e |
|
MD5 | 867e3e5b1d8765c247ca4edc59cebba7 |
|
BLAKE2b-256 | c4b7524b9f2616579de8cb19158ecd0292721f687fc98d7b232d0cc6acb78e20 |