Changes between Version 34 and Version 35 of DjangoGraphviz


Ignore:
Timestamp:
11/30/2010 08:51:30 PM (5 years ago)
Author:
rcoup
Comment:

Remove dead links, add direct link to django-extensions version, update command.

Legend:

Unmodified
Added
Removed
Modified
  • DjangoGraphviz

    v34 v35  
    11= Converting Django models into Graphviz DOT files =
    22
    3 Inspired by [http://www.hackdiary.com/archives/000093.html this nice hack by Matt Biddulph], this is a Python script that generates a Graphviz DOT file for quick visualizations of Django model definitions.
     3Inspired by [http://www.hackdiary.com/archives/000093.html this nice hack by Matt Biddulph], this is a Python script that generates a [http://www.graphviz.org/ Graphviz] DOT file for quick visualizations of Django model definitions.
    44
    55== Source code ==
    66
    7 [http://unicoders.org/code/django/trunk/utils/modelviz.py View online] or [http://code.unicoders.org/django/trunk/utils/modelviz.py download from Subversion repository] (you could also set it as a svn:external on your repository to keep up to date with the latest revisons.)
    8 
    9 === Checkout ===
    10 {{{
    11 svn co svn://unicoders.org/unicoders/django/trunk/utils/ modelviz
    12 }}}
     7The [http://code.google.com/p/django-command-extensions/ Django-extensions] version seems to be most up-to-date. You only need this file, not the whole project:
     8  http://github.com/django-extensions/django-extensions/blob/master/django_extensions/management/modelviz.py
    139
    1410== Examples ==
     
    2521== Command ==
    2622
    27 Once you use this python script to generate the dot file ({{{app.dot}}}), ensure you have {{{dot}}} installed (part of Graphviz), and issue:
     23{{{
     24python modelviz.py myapp myotherapp > app.dot
     25}}}
     26For more options, run with `--help`
     27
     28Once you use this python script to generate the dot file ({{{app.dot}}}), you should be able to open it with [http://www.graphviz.org/ Graphviz]. To convert to a png, ensure you have {{{dot}}} installed (part of Graphviz), and issue:
    2829{{{
    2930dot app.dot -Tpng -o app.png
     
    3435You might also be interested in [http://www.exit66.com/diagram.zip this Django app by Andrew Barilla ] from which I borrowed some ideas, that displays the graphviz results directly from the web.
    3536
    36 [http://code.google.com/p/django-command-extensions/ Django-extensions] (formerly named Django-command-extensions) already provides a command to visualize your models. Using an improved version of the modelviz script. It also includes/supports grouping of your Django applications. Which will group all models of a single app together. This makes larger projects much easier and clearer to view.
     37[http://code.google.com/p/django-command-extensions/ Django-extensions] (formerly named Django-command-extensions) provides a command to visualize your models. Using an improved version of the modelviz script. It also includes/supports grouping of your Django applications. Which will group all models of a single app together. This makes larger projects much easier and clearer to view.
    3738
    3839Usage:
     
    4243}}}
    4344
    44 
    4545== Feedback ==
    4646
Back to Top