idlesign / django-sitetree

Reusable application for Django introducing site tree, menu and breadcrumbs navigation elements.
http://github.com/idlesign/django-sitetree
BSD 3-Clause "New" or "Revised" License
347 stars 132 forks source link

Make permissions in dynamic item lazy evaluated #303

Closed jgadelange closed 3 years ago

jgadelange commented 3 years ago

This fixes #302. By adding lazy evaluation for the permissions we prevent manage.py breaking down when using dynamic items with permissions in an AppConfig.ready().

jgadelange commented 3 years ago

I also created two alternatives solutions (see https://github.com/fluxility/django-sitetree/commit/af46e52a90c9f97255d7897bf64e93762e3b455c and https://github.com/fluxility/django-sitetree/commit/3386ef7f996a11bd7a716b82d4430daf3fe89e2f).

Please let me know if you prefer one of the other solutions better.

idlesign commented 3 years ago

Thank you. I'll try to check this out in a week.

idlesign commented 3 years ago

I'd like to ask you to rebase on current master where the proper CI Action is in place.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.01%) to 95.827% when pulling 725a42db7d4579d580a75c0c0bdeb655e4afae3c on fluxility:master into a2d77e9c282fc4be60698a8421c42a494393e794 on idlesign:master.

idlesign commented 3 years ago

Thank you. Merged.