Open
Conversation
Contributor
Author
|
I believe the testsuite breakage is unrelated to my changes. |
Contributor
Author
|
@MiltonLn Any views on this :)? |
Member
|
Hey @Natureshadow thanks for the contribution, I'm gonna take a closer look this weekend. |
Contributor
Author
Did you come to a conclusion yet :)? |
Contributor
Author
|
Hi! I hope you had peaceful holidays. Did you get a chance to look into this? |
Member
|
Hi @Natureshadow can you update your PRs with the current |
Move catch-all URL pattern to bottom; it was actually shadowing all other patterns.
11e0d34 to
84c80f3
Compare
Contributor
Author
Done! |
Contributor
Author
|
Hi, this is to inform you that I will fork and release as django-menu-generator-ng next week, if there is no action on this PR. Cheers, |
Spawin
added a commit
to Spawin/django-menu-generator
that referenced
this pull request
Jul 13, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements a
related_viewsattribute similar torelated_urls. It takes a list of views instead of URL names or paths, so that views that take non-optional arguments can be matched without hard-coding URL snippets.It is also guaranteed to work all the time and match unambiguously, because it matches in the reverse direction of
related_urls— it looks at the current request, which yielded a view, and compares that very view to the list.I consider this far more useful than the
related_urlsapproach because the latter more or less enforces anti-patterns, but of course I do not mind havingrelated_urlsas well.