This binding occurs in [https://docs.djangoproject.com/en/1.11/ref/class-
based-views/base/#django.views.generic.base.View.as_view .as_view()]:
https://github.com/django/django/blob/711123e/django/views/generic/base.py#L63
CBV documentation doesn't mention it:
https://docs.djangoproject.com/en/1.11/topics/class-based-views/intro/
If a user is using .as_view() in a high level view, they won't see
HttpRequest being passed in as a method argument unless they're using
[https://docs.djangoproject.com/en/1.11/ref/class-based-views/base/#view
something like .get() or .post()]
Documentation should be clarify where and how self.request in views comes
into the life cycle of a view.
--
Ticket URL: <https://code.djangoproject.com/ticket/28294>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
Comment:
Using the documentation search for "self.request" I found a mention in the
[https://docs.djangoproject.com/en/dev/topics/class-based-views/generic-
display/#dynamic-filtering Dynamic filtering] section, but I agree that it
(and other attributes like `self.args` and `self.kwargs`) could be
mentioned elsewhere -- perhaps in
[https://docs.djangoproject.com/en/1.11/ref/class-based-
views/base/#django.views.generic.base.View.as_view View.as_view()] as
that's where the assignment happens.
--
Ticket URL: <https://code.djangoproject.com/ticket/28294#comment:1>
* owner: nobody => Michael Vasiliou
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28294#comment:2>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/8674 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28294#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"63e9a71ec4917ddf7f4acbf69a7ccdafb76fb2ee" 63e9a71]:
{{{
#!CommitTicketReference repository=""
revision="63e9a71ec4917ddf7f4acbf69a7ccdafb76fb2ee"
Fixed #28294 -- Doc'd request/args/kwargs attributes of class-based views.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28294#comment:4>
Comment (by Tim Graham <timograham@…>):
In [changeset:"a6756195c1a11eee10c16c96fe95d52e22e1d9ba" a6756195]:
{{{
#!CommitTicketReference repository=""
revision="a6756195c1a11eee10c16c96fe95d52e22e1d9ba"
[1.11.x] Fixed #28294 -- Doc'd request/args/kwargs attributes of class-
based views.
Backport of 63e9a71ec4917ddf7f4acbf69a7ccdafb76fb2ee from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28294#comment:5>