mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Removed request.REQUEST per deprecation timeline; refs #18659.
This commit is contained in:
@@ -108,21 +108,6 @@ All attributes should be considered read-only, unless stated otherwise below.
|
||||
|
||||
Note: ``POST`` does *not* include file-upload information. See ``FILES``.
|
||||
|
||||
.. attribute:: HttpRequest.REQUEST
|
||||
|
||||
.. deprecated:: 1.7
|
||||
Use the more explicit ``GET`` and ``POST`` instead.
|
||||
|
||||
For convenience, a dictionary-like object that searches ``POST`` first,
|
||||
then ``GET``. Inspired by PHP's ``$_REQUEST``.
|
||||
|
||||
For example, if ``GET = {"name": "john"}`` and ``POST = {"age": '34'}``,
|
||||
``REQUEST["name"]`` would be ``"john"``, and ``REQUEST["age"]`` would be
|
||||
``"34"``.
|
||||
|
||||
It's strongly suggested that you use ``GET`` and ``POST`` instead of
|
||||
``REQUEST``, because the former are more explicit.
|
||||
|
||||
.. attribute:: HttpRequest.COOKIES
|
||||
|
||||
A standard Python dictionary containing all cookies. Keys and values are
|
||||
|
||||
@@ -130,12 +130,11 @@ view; it'll apply response middleware to that
|
||||
|
||||
.. note::
|
||||
|
||||
Accessing :attr:`request.POST <django.http.HttpRequest.POST>` or
|
||||
:attr:`request.REQUEST <django.http.HttpRequest.REQUEST>` inside middleware
|
||||
from ``process_request`` or ``process_view`` will prevent any view running
|
||||
after the middleware from being able to :ref:`modify the upload handlers
|
||||
for the request <modifying_upload_handlers_on_the_fly>`, and should
|
||||
normally be avoided.
|
||||
Accessing :attr:`request.POST <django.http.HttpRequest.POST>` inside
|
||||
middleware from ``process_request`` or ``process_view`` will prevent any
|
||||
view running after the middleware from being able to :ref:`modify the
|
||||
upload handlers for the request <modifying_upload_handlers_on_the_fly>`,
|
||||
and should normally be avoided.
|
||||
|
||||
The :class:`~django.middleware.csrf.CsrfViewMiddleware` class can be
|
||||
considered an exception, as it provides the
|
||||
|
||||
Reference in New Issue
Block a user