django-menu-generator
django-menu-generator copied to clipboard
Implement related views
This implements a related_views attribute similar to related_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_urls approach because the latter more or less enforces anti-patterns, but of course I do not mind having related_urls as well.
I believe the testsuite breakage is unrelated to my changes.
@MiltonLn Any views on this :)?
Hey @Natureshadow thanks for the contribution, I'm gonna take a closer look this weekend.
Hey @Natureshadow thanks for the contribution, I'm gonna take a closer look this weekend.
Did you come to a conclusion yet :)?
Hi! I hope you had peaceful holidays.
Did you get a chance to look into this?
Hi @Natureshadow can you update your PRs with the current master version? That should fix all the builds
Hi @Natureshadow can you update your PRs with the current
masterversion? That should fix all the builds
Done!
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, Nik