Skip to content

Instantly share code, notes, and snippets.

@bikemule
Last active March 21, 2020 14:41
Show Gist options
  • Save bikemule/ae9b8b3fc837341f84b0a34f41be323e to your computer and use it in GitHub Desktop.
Save bikemule/ae9b8b3fc837341f84b0a34f41be323e to your computer and use it in GitHub Desktop.
Django model graph of specific apps, grouped by app, without inheritance
# Graph the models of specified apps.
# manage.py graph_models arguments:
# -g = Group models by app.
# -E = Do not show model inheritance.
# --output output_file, used with --pygraphviz
# `date --rfc-3339=date` = YYYY-MM-DD
python manage.py graph_models --pygraphviz -gE --output modelsgraph-`date --rfc-3339=date`.png appname1 appname2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment