Django

Code

Changeset 9153

Show
Ignore:
Timestamp:
10/05/08 11:03:58 (3 months ago)
Author:
ubernostrum
Message:

Add note to 1.0 porting guide about removal of dictionary access to HTTP request objects

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/releases/1.0-porting-guide.txt

    r9017 r9153  
    567567HTTP request/response objects 
    568568----------------------------- 
     569 
     570Dictionary access to ``HttpRequest`` 
     571~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     572 
     573``HttpRequest`` objects no longer directly support dictionary-style 
     574access; previously, both ``GET`` and ``POST`` data were directly 
     575available on the ``HttpRequest`` object (e.g., you could check for a 
     576piece of form data by using ``if 'some_form_key' in request`` or by 
     577reading ``request['some_form_key']``. This is no longer supported; if 
     578you need access to the combined ``GET`` and ``POST`` data, use 
     579``request.REQUEST`` instead. 
     580 
     581It is strongly suggested, however, that you always explicitly look in 
     582the appropriate dictionary for the type of request you expect to 
     583receive (``request.GET`` or ``request.POST``); relying on the combined 
     584``request.REQUEST`` dictionary can mask the origin of incoming data. 
    569585 
    570586Accessing ``HTTPResponse`` headers