Changes between Version 3 and Version 4 of HttpResponse


Ignore:
Timestamp:
10/04/2007 11:57:49 AM (8 years ago)
Author:
Gulopine
Comment:

Updated to reflect recent changes in header access

Legend:

Unmodified
Added
Removed
Modified
  • HttpResponse

    v3 v4  
    1717== Attributes ==
    1818
    19 || `headers` || Standard Python dictionary of HTTP headers that will be sent in the response; most useful for [http://www.djangoproject.com/documentation/middleware/ middleware] ||
    2019|| `cookies` || [http://docs.python.org/lib/module-Cookie.html SimpleCookie] object containing the cookies that will be sent in the response; most useful for [http://www.djangoproject.com/documentation/middleware/ middleware] ||
    2120|| `content` || A property which provides read-write access to the response body as a string only ||
     
    2322== Methods ==
    2423
    25 || `has_header(key)` || Returns `True` if the given header will be sent in the response (case-insensitive), `False` otherwise ||
    2624|| `set_cookie(key, value='')` || Creates a cookie that will be set on the cilent when the response is sent. Additional optional arguments are avaialble: `max_age=None, expires=None, path='/', domain=None, secure=None` ||
    2725|| `delete_cookie(key)` || Schedules the specified cookie to be deleted when the response is sent. Addition optional arguments are available: `path='/', domain=None` ||
     
    3735'attachment; filename=report.pdf'
    3836>>> del response['Content-Disposition']
     37>>> 'Content-Disposition' in response
     38False
    3939}}}
    4040
Back to Top