summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2011-12-16 23:40:32 +0000
committerAdrian Holovaty <adrian@holovaty.com>2011-12-16 23:40:32 +0000
commit3f003a3c4b5338915e3889da8bf10577296459b3 (patch)
treebca5e19c862746c69057e4819e754254d31e5a17 /docs
parent61f0aff811aa596fa62136852c59d47f988d1185 (diff)
Fixed #17323 -- Renamed HttpRequest.raw_post_data to request.body. Thanks for the patch, dstufft
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/internals/deprecation.txt4
-rw-r--r--docs/ref/request-response.txt25
-rw-r--r--docs/releases/1.4.txt7
3 files changed, 25 insertions, 11 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index 91fde966fc..cae3f9f36c 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -257,6 +257,10 @@ these changes.
* Setting the ``is_safe`` and ``needs_autoescape`` flags as attributes of
template filter functions will no longer be supported.
+* The attribute ``HttpRequest.raw_post_data`` was renamed to ``HttpRequest.body``
+ in 1.4. The backward compatibility will be removed --
+ ``HttpRequest.raw_post_data`` will no longer work.
+
2.0
---
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index 64d0e10ca3..b0be311de9 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -30,6 +30,20 @@ Attributes
All attributes except ``session`` should be considered read-only.
+.. attribute:: HttpRequest.body
+
+ .. versionchanged:: 1.4
+ Before Django 1.4, ``HttpRequest.body`` was named ``HttpRequest.raw_post_data``.
+
+ The raw HTTP request body as a byte string. This is useful for processing
+ data in different ways than conventional HTML forms: binary images,
+ XML payload etc. For processing conventional form data, use ``HttpRequest.POST``.
+
+ .. versionadded:: 1.3
+
+ You can also read from an HttpRequest using a file-like interface. See
+ :meth:`HttpRequest.read()`.
+
.. attribute:: HttpRequest.path
A string representing the full path to the requested page, not including
@@ -170,17 +184,6 @@ All attributes except ``session`` should be considered read-only.
support activated. See the :doc:`session documentation
</topics/http/sessions>` for full details.
-.. attribute:: HttpRequest.raw_post_data
-
- The raw HTTP POST data as a byte string. This is useful for processing
- data in different formats than of conventional HTML forms: binary images,
- XML payload etc. For processing form data use ``HttpRequest.POST``.
-
- .. versionadded:: 1.3
-
- You can also read from an HttpRequest using file-like interface. See
- :meth:`HttpRequest.read()`.
-
.. attribute:: HttpRequest.urlconf
Not defined by Django itself, but will be read if other code (e.g., a custom
diff --git a/docs/releases/1.4.txt b/docs/releases/1.4.txt
index f614dee5f8..7ffc1aa654 100644
--- a/docs/releases/1.4.txt
+++ b/docs/releases/1.4.txt
@@ -995,3 +995,10 @@ useful, it was removed in Django 1.4. If you relied on it, you must edit your
settings file to list all your applications explicitly.
.. _this can't be done reliably: http://docs.python.org/tutorial/modules.html#importing-from-a-package
+
+``HttpRequest.raw_post_data`` renamed to ``HttpRequest.body``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This attribute was confusingly named ``HttpRequest.raw_post_data``, but it
+actually provided the body of the HTTP request. It's been renamed to
+``HttpRequest.body``, and ``HttpRequest.raw_post_data`` has been deprecated.