django-menu-generator icon indicating copy to clipboard operation
django-menu-generator copied to clipboard

Implement related views

Open Natureshadow opened this issue 5 years ago • 8 comments

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.

Natureshadow avatar Nov 16 '20 22:11 Natureshadow

I believe the testsuite breakage is unrelated to my changes.

Natureshadow avatar Nov 17 '20 08:11 Natureshadow

@MiltonLn Any views on this :)?

Natureshadow avatar Nov 25 '20 11:11 Natureshadow

Hey @Natureshadow thanks for the contribution, I'm gonna take a closer look this weekend.

MiltonLn avatar Nov 25 '20 22:11 MiltonLn

Hey @Natureshadow thanks for the contribution, I'm gonna take a closer look this weekend.

Did you come to a conclusion yet :)?

Natureshadow avatar Dec 04 '20 22:12 Natureshadow

Hi! I hope you had peaceful holidays.

Did you get a chance to look into this?

Natureshadow avatar Dec 27 '20 23:12 Natureshadow

Hi @Natureshadow can you update your PRs with the current master version? That should fix all the builds

yamijuan avatar Dec 29 '20 15:12 yamijuan

Hi @Natureshadow can you update your PRs with the current master version? That should fix all the builds

Done!

Natureshadow avatar Jan 05 '21 13:01 Natureshadow

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

Natureshadow avatar Jan 12 '21 10:01 Natureshadow