1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Update the class based view documentation to make it more clear

This commit is contained in:
Chaitanya Rahalkar 2024-12-19 14:04:04 -06:00
parent 7e41a7a47d
commit eb94b3f679

View File

@ -330,6 +330,13 @@ various useful things are stored on ``self``; as well as the request
(``self.request``) this includes the positional (``self.args``) and name-based
(``self.kwargs``) arguments captured according to the URLconf.
These attributes are set up by the view's ``setup()`` method, which is called at
the beginning of the view processing. The ``setup()`` method sets:
* ``self.request`` - The current request object
* ``self.args`` - Positional arguments captured from the URL pattern
* ``self.kwargs`` - Keyword arguments captured from the URL pattern
Here, we have a URLconf with a single captured group::
# urls.py