diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-08-09 15:40:24 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-08-09 15:40:24 +0000 |
| commit | 925c711cf75072526ced0ae8f18d561dca612092 (patch) | |
| tree | 9461d6434255e8d099047b7216abe81f3491691b /docs/request_response.txt | |
| parent | 2c370e1a08d3d7bac17d8cfe8c909466d0cf2782 (diff) | |
Fixed #2503 -- Fixed HttpResponse.delete_cookie() to work properly. It now takes path and domain as optional keyword arguments.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/request_response.txt')
| -rw-r--r-- | docs/request_response.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/request_response.txt b/docs/request_response.txt index 7480a6d3bb..1f3b9d5804 100644 --- a/docs/request_response.txt +++ b/docs/request_response.txt @@ -149,7 +149,7 @@ Methods Returns the ``path``, plus an appended query string, if applicable. Example: ``"/music/bands/the_beatles/?print=true"`` - + ``is_secure()`` Returns ``True`` if the request is secure; that is, if it was made with HTTPS. @@ -380,10 +380,14 @@ Methods .. _`cookie Morsel`: http://www.python.org/doc/current/lib/morsel-objects.html -``delete_cookie(key)`` +``delete_cookie(key, path='/', domain=None)`` Deletes the cookie with the given key. Fails silently if the key doesn't exist. + The ``path`` and ``domain`` arguments are new in the Django development version. + Due to the way cookies work, ``path`` and ``domain`` should be the same + values you used in ``set_cookie()`` -- otherwise the cookie may not be deleted. + ``content`` Returns the content as a Python string, encoding it from a Unicode object if necessary. Note this is a property, not a method, so use ``r.content`` |
