Skip to main content

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 models screenshot
Apps apps screenshot
Both together models and apps screenshot
Graph editor menu screenshot

(Apologies that the images above don't work on PyPI. Check it out on GitHub.)


Install from PyPI:

pip install django-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()),


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.


Tests run on sensible combinations of:

  • Python (3.6-3.11)
  • Django (1.11-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 Django 1.8 was 1.2.0


  • 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_schema_graph-2.2.1.tar.gz (297.7 kB view hashes)

Uploaded Source

Built Distribution

django_schema_graph-2.2.1-py3-none-any.whl (298.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page