Fixed #27289 -- Corrected View.as_view() explanation.

Thanks Graham Wideman for the report.
This commit is contained in:
Tim Graham 2016-09-28 10:58:56 -04:00
parent a44fc008c4
commit f2ff1b2fab
1 changed files with 3 additions and 3 deletions

View File

@ -80,9 +80,9 @@ In a class-based view, this would become::
Because Django's URL resolver expects to send the request and associated Because Django's URL resolver expects to send the request and associated
arguments to a callable function, not a class, class-based views have an arguments to a callable function, not a class, class-based views have an
:meth:`~django.views.generic.base.View.as_view` class method which serves as :meth:`~django.views.generic.base.View.as_view` class method which returns a
the callable entry point to your class. The ``as_view`` entry point creates an function that can be called when a request arrives for a URL matching the
instance of your class and calls its associated pattern. The function creates an instance of the class and calls its
:meth:`~django.views.generic.base.View.dispatch` method. ``dispatch`` looks at :meth:`~django.views.generic.base.View.dispatch` method. ``dispatch`` looks at
the request to determine whether it is a ``GET``, ``POST``, etc, and relays the the request to determine whether it is a ``GET``, ``POST``, etc, and relays the
request to a matching method if one is defined, or raises request to a matching method if one is defined, or raises