I was trying to visualize the database of a project and saw it was recommended to use django-extensions
to do that, so I followed the documentation. What I did was:
Install pyparsing
and pydot
using pip and also install graphviz
without pip. Also modify my settings as follow:
#settings.py
INSTALLED_APPS = ['blabla', ... 'django-extensions']
GRAPH_MODELS = {
'all_applications': True,
'group_models': True,
}
And I ran the command - ./manage.py graph_models --pydot -a -g -o my_project_visualized.png
in the container.
It does end up producing a .png
file, however, the text is just squares.
I saw there are other threads, where people have problems with the versions of pyparsing
and pydot
. I haven't specified any versions, as I had no issues installing both and also when running the above mentioned command.
I found out from this repository that installing ttf-freefont solves this problem.
Installing in Alpine linux:
apk add --update --no-cache \
graphviz \
ttf-freefont
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With