This was really easy and the result is really good-lookin.

The article is almost accurate. Some really accurate steps:

cd /path/to/your/django/project
git clone
cp django-extensions/django_extensions/management/ . 
ln -s $PWD/django-extensions/django_extensions/templates/django_extensions templates/ 
python name_of_django_app >
dot -Tpng -o app.png

(And of course you need first.)

UPDATE: ok the above is really the ugly way of doing it. The nice way is:

# Install django-extensions 
pip install django-extensions

# In add django_extensions INSTALLED_APPS

# Generate graph
python graph_models name_of_django_app >
dot -Tpng -o app.png

blog comments powered by Disqus