dsg

django-schema-graph

An interactive graph of your Django model structure

Showing:

Popularity

Downloads/wk

0

GitHub Stars

291

Maintenance

Last Commit

7mos ago

Contributors

4

Package

Dependencies

1

License

MIT

Categories

Readme

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:

FeatureScreenshot
Modelsmodels screenshot
Appsapps screenshot
Both togethermodels and apps screenshot
Graph editormenu screenshot

(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).

Note: DEBUG mode is required, on the assumption 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.6-3.9)
  • Django (1.11-3.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 Django 1.8 was 1.2.0

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.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100