#25142: Refactor dispatch method in PermissionRequiredMixin to allow
customisation
--------------------------------------+------------------------------------
Reporter: dfunckt | Owner: dfunckt
Type: Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by dfunckt):
{{{get_object()}}} will get called twice -- I don't see a way around it,
unless itself caches the result somewhere, but I haven't investigated what
happens then with form mixins. Another way would be to delay permission
checks by wrapping the handler methods themselves, but this seems fragile.
I personally consider this a fair compromise, but suggestions are welcome.
--
Ticket URL: <https://code.djangoproject.com/ticket/25142#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.1e4085fe28d4fd114c72e4312f97aba4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.