Generating ERD for Django Applications

Generating an ERD (Entity Relationship Diagram) can be helpful to understand what your database looks like, and is also really easy to generate if you’re running a Python/Django Application.

Step 1: Install django-extensions and graphviz

 pip install django-extensions && pip install graphviz

Step 2: Add django_extensions to


Step 3 Create the .dot output and convert to .png

Run graph_models from the environment you may normally use:

python graph_models -a >

From your mac, change the format to png using graphviz

brew install graphviz
dot -Tpng -o output.png

Django Extensions graph_models docs
Django Extensions Commands Unavailable?
Opening .dot files on mac

Leave a Reply

Your email address will not be published. Required fields are marked *