leodutra
8/2/2017 - 7:42 PM

Generate Graph Viz from Django Models

Generate Graph Viz from Django Models

install django-extensions in the project

Windows

install Graphviz 2.38+
download graphviz libs for Windows x64

pip install --global-option=build_ext --global-option="-IC:\workspaces\graphviz-2.38_x64\include" --global-option="-LC:\workspaces\graphviz-2.38_x64\lib" --no-cache-dir pygraphviz

Linux (Ubuntu)

sudo apt-get install graphviz libgraphviz-dev pkg-config
# activate virtualenv
sudo pip install pygraphviz

References http://django-extensions.readthedocs.io/en/latest/graph_models.html https://github.com/pygraphviz/pygraphviz/blob/28b9e9d0cefc107f19518a001566b48e1f3c767d/INSTALL.txt https://github.com/pygraphviz/pygraphviz/issues/58 https://github.com/pygraphviz/pygraphviz/issues/11#issuecomment-172573720