Django model to DOT (Graphviz) converter by Antonio Cavedoni <antonio@cavedoni.org>
edited as management script by Benjamin Bach <benjamin@overtag.dk>
Depends on package ‘graphviz’, ie. ‘apt-get install graphviz’
Example usage: $ ./manage.py wikiviz wiki –inheritance | dot -Tpdf -o <filename>.pdf
Place this script in the management.commands package of your application or project.
-h, –help show this help message and exit.
-a, –all_applications show models from all applications.
-d, –disable_fields don’t show the class member fields.
-g, –group_models draw an enclosing box around models from the same app.
-i, –include_models=User,Person,Car only include selected models in graph.
-n, –verbose_names use verbose_name for field and models.
-L, –language specify language used for verrbose_name localization
-x, –exclude_columns exclude specific column(s) from the graph.
-X, –exclude_models exclude specific model(s) from the graph.
-e, –inheritance show inheritance arrows.
Bases: django.core.management.base.BaseCommand