Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add note to 1.0 porting guide about removal of dictionary access to H…

…TTP request objects

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b131462d76d028ef8b0aaebdfcf3e63370e57c49 1 parent 2f0be0f
@ubernostrum ubernostrum authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 docs/releases/1.0-porting-guide.txt
View
16 docs/releases/1.0-porting-guide.txt
@@ -567,6 +567,22 @@ it to ``_`` yourself::
HTTP request/response objects
-----------------------------
+Dictionary access to ``HttpRequest``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``HttpRequest`` objects no longer directly support dictionary-style
+access; previously, both ``GET`` and ``POST`` data were directly
+available on the ``HttpRequest`` object (e.g., you could check for a
+piece of form data by using ``if 'some_form_key' in request`` or by
+reading ``request['some_form_key']``. This is no longer supported; if
+you need access to the combined ``GET`` and ``POST`` data, use
+``request.REQUEST`` instead.
+
+It is strongly suggested, however, that you always explicitly look in
+the appropriate dictionary for the type of request you expect to
+receive (``request.GET`` or ``request.POST``); relying on the combined
+``request.REQUEST`` dictionary can mask the origin of incoming data.
+
Accessing ``HTTPResponse`` headers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please sign in to comment.
Something went wrong with that request. Please try again.