Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#19316 closed Cleanup/optimization (fixed)

Set args, kwargs & request before dispatch

Reported by: ghickman Owned by: nobody
Component: Generic views Version: master
Severity: Normal Keywords:
Cc: mike@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


By moving the assignment of args, kwargs & request on self out of dispatch to the nested view method in as_view we can avoid the need for an additional hook to the CBV API while allowing easier overriding of dispatch. Anyone wishing to override dispatch with HTTP method agnostic code, such as permissions checks, can then rely on these variables being available on self.

Mailing list discussion:!topic/django-developers/7c7aI-slGNc

Pull Request:

Change History (4)

comment:1 Changed 4 years ago by carbonXT

  • Cc mike@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 4 years ago by claudep

  • Triage Stage changed from Unreviewed to Ready for checkin

comment:3 Changed 4 years ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In ea6b95dbec77371d517392ffb465017b8eb7001c:

Fixed #19316 -- Set View args/kwargs/request before dispatch

comment:4 Changed 4 years ago by Claude Paroz <claude@…>

In 12cf9d2be3cccb2ff63d78e93f97188040488a3d:

[1.5.x] Fixed #19316 -- Set View args/kwargs/request before dispatch

Backport of ea6b95db from master.

Note: See TracTickets for help on using tickets.
Back to Top