-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
graph_models style per app #1848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for the update. It looks like the PR now removes And sorry with the move to |
@trbs no worries π .. I added the |
@trbs resolved the new conflicts and fix the lint |
@ahmad88me Is it possible to update https://django-extensions.readthedocs.io/en/latest/graph_models.html#graph-models too? Currently, there is no info in the docs about this new option. |
good catch π yes please submit a new PR for updated docs, thanks ! |
Idea
Style the generated model per app.
use case
Imagine you're working on a Django project composed of two distinct applications, namely 'app1' and 'app2'. These applications are interconnected, with models in each app having relationships not only within the same app but also across the two apps. To effectively visualise these intricate relationships, you're aiming to generate a comprehensive graph model. This graph will not only illustrate the internal model structures within each individual app but will also clearly depict the inter-app model relationships. The goal is to have a single, unified graphical representation that vividly differentiates the models of 'app1' and 'app2', while simultaneously showcasing the connections between them. Such a visual tool would be invaluable for understanding the complex architecture of your Django project at a glance.
How to use it
You can either have a
.app-style.json
or you can specify the style file using the--app-style
option. It takes a path to the style file. The style file is a json file which has the app name as the key and the style as the value. Here is a sample one:Further, I updated the django style to support the background change. So in the future, this can easily be extended to more styles (e.g., color, font, ..., etc.)