#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 --------------------------------------+------------------------------------ Changes (by MarkusH):
* needs_docs: 0 => 1 * needs_better_patch: 0 => 1 * needs_tests: 0 => 1 * stage: Unreviewed => Accepted Comment: Does this actually solve the issue? You haven't called `get_object()` by the time `dispatch()` is called. You would now query for the object twice, one during permission check and once sometime later (depending on the CBV). Tentively accepting based on the general idea. -- Ticket URL: <https://code.djangoproject.com/ticket/25142#comment:3> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.73f6d01730bfe5146cc35c995fc008d7%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.