#19316 closed Cleanup/optimization (fixed)
Set args, kwargs & request before dispatch
Reported by: | ghickman | Owned by: | nobody |
---|---|---|---|
Component: | Generic views | Version: | dev |
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 |
Description
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: https://groups.google.com/forum/?fromgroups=#!topic/django-developers/7c7aI-slGNc
Pull Request: https://github.com/django/django/pull/532
Change History (4)
comment:1 by , 12 years ago
Cc: | added |
---|
comment:2 by , 12 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
In ea6b95dbec77371d517392ffb465017b8eb7001c: