A class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system’s classes, their attributes, operations (or methods), and the relationships among objects.
https://github.com/django-extensions/django-extensions
Step 1: Install django extensions
Command: pip install django-extensions
Step 2: Add to installed apps
Step 3: Install diagrams generators
Note: I prefer to use
Command: pip install pydotplus
Command :: python manage.py graph_models -a -o myapp_models.png
This will give use the entire Wagtail class diagram:
Thank for visiting :)
https://github.com/django-extensions/django-extensions
Step 1: Install django extensions
Command: pip install django-extensions
Step 2: Add to installed apps
INSTALLED_APPS = (
...
'django_extensions',
...
)
Step 3: Install diagrams generators
You have to choose between two diagram generators:
- Graphviz or
- Dotplus
before using the command or you will get:
python manage.py graph_models -a -o myapp_models.png
python manage.py graph_models -a -o myapp_models.png
Note: I prefer to use
pydotplus
as it easier to install than Graphviz and its dependencies so we use pip install pydotplus.Command: pip install pydotplus
Step 4: Generate diagrams
Now we have everything installed and ready to generate diagrams using the command python manage.py graph_models
Command :: python manage.py graph_models -a -o myapp_models.png
This will give use the entire Wagtail class diagram:
Thank for visiting :)