Skip to content

Instantly share code, notes, and snippets.

@narenaryan
Last active August 29, 2015 14:13
Show Gist options
  • Save narenaryan/ea763056718a224a512c to your computer and use it in GitHub Desktop.
Save narenaryan/ea763056718a224a512c to your computer and use it in GitHub Desktop.
Tutorial for creating graph visualizations for your Django models
$ pip install django-extensions
#These libraries are necessary before you proceed.
$ sudo apt-get install graphviz
$ sudo apt-get install graphviz-dev
#add django-extensions in project settigns.py
INSTALLED_APPS = (
...
'django_extensions',
...
)
$ python manage.py graph_models <your_model_name> -o example.svg
#It creates an image called example.svg graph for your model specified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment