Skip to content

Commit

Permalink
[1.0.X]: Add note to 1.0 porting guide about removal of dictionary ac…
Browse files Browse the repository at this point in the history
…cess to HTTP request objects

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9154 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
ubernostrum committed Oct 5, 2008
1 parent 9273575 commit 0752742
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/releases/1.0-porting-guide.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -567,6 +567,22 @@ it to ``_`` yourself::
HTTP request/response objects 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 Accessing ``HTTPResponse`` headers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Expand Down

0 comments on commit 0752742

Please sign in to comment.