Skip to content
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

Flag for graph_models to color code relations based on on_delete. (#1604) #1664

Merged
merged 7 commits into from Jun 11, 2022

Conversation

PauloRSF
Copy link
Contributor

@PauloRSF PauloRSF commented May 4, 2021

I implemented a new flag (--color-code-deletions) for the graph_models command. It adds custom colors for 'ForeignKey's and 'OneToOneField's edges, based on their on_delete setting. That allows a quick visual understanding of the effects of a model's deletion, as proposed on issue #1604.

This is my first contribution on this project, so, if anything can/should be improved, let me know!

Closes #1604.

@JackAtOmenApps
Copy link
Contributor

Looks like a good addition. And you provided tests, so I suspect this will be an easy commit once the maintainers get a chance to take a look!

@camilonova camilonova merged commit 5053457 into django-extensions:main Jun 11, 2022
@PauloRSF PauloRSF deleted the deletions-color-coding branch December 20, 2022 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] Optional colorization for graph edges based on on_delete criteria
3 participants