[3.1.x] Fixed #31739 -- Documented dependency between HttpRequest stream IO methods and body.

Backport of 060576b0ab from master
This commit is contained in:
Tim Park 2020-07-08 01:40:33 -07:00 committed by Carlton Gibson
parent dad6973629
commit 3756a0509a
1 changed files with 4 additions and 2 deletions

View File

@ -43,8 +43,10 @@ All attributes should be considered read-only, unless stated otherwise.
XML payload etc. For processing conventional form data, use
:attr:`HttpRequest.POST`.
You can also read from an ``HttpRequest`` using a file-like interface. See
:meth:`HttpRequest.read()`.
You can also read from an ``HttpRequest`` using a file-like interface with
:meth:`HttpRequest.read` or :meth:`HttpRequest.readline`. Accessing
the ``body`` attribute *after* reading the request with either of these I/O
stream methods will produce a ``RawPostDataException``.
.. attribute:: HttpRequest.path