4

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. enter image description here

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.

l0b0
  • 55,365
  • 30
  • 138
  • 223
dsax7
  • 1,333
  • 22
  • 36

1 Answers1

5

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
hygorxaraujo
  • 659
  • 6
  • 19