Changes between Version 36 and Version 37 of DjangoGraphviz


Ignore:
Timestamp:
Nov 23, 2013, 9:54:09 AM (11 years ago)
Author:
Camilo Nova
Comment:

Updated documentation

Legend:

Unmodified
Added
Removed
Modified
  • DjangoGraphviz

    v36 v37  
    11= Converting Django models into Graphviz DOT files =
    22
    3 This is a Python script that generates a [http://www.graphviz.org/ Graphviz] DOT file for quick visualizations of Django model definitions.
    4 
    5 == Source code ==
    6 
    7 The [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
     3You can accomplish this by using the [https://github.com/django-extensions/django-extensions django-extensions] package, you can install it from pypi.
    94
    105== Examples ==
     
    1914}}}
    2015
    21 == Command ==
     16== Usage ==
    2217
    23 {{{
    24 python modelviz.py myapp myotherapp > app.dot
    25 }}}
    26 For more options, run with `--help`
    27 
    28 Once 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:
    29 {{{
    30 dot app.dot -Tpng -o app.png
    31 }}}
    32 
    33 == Other References ==
    34 
    35 You 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.
    36 
    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.
    38 
    39 Usage:
    40 {{{
    41  # download django-extensions and include it in your app.
    42  $ ./manage.py graph_models -a -g -o my_project.png
    43 }}}
     18Follow the steps from the original documentation [http://django-extensions.readthedocs.org/en/latest/graph_models.html]
    4419
    4520== Feedback ==
    4621
    47 Please direct all feedback to [http://cavedoni.com/ Antonio Cavedoni].
     22Please direct all feedback to [https://github.com/django-extensions/django-extensions]
Back to Top