mirror of
https://github.com/django/django.git
synced 2025-11-01 20:31:40 +00:00
Fixed #23977 -- Added setdefault() method to HttpResponse
This commit is contained in:
parent
d4e449d730
commit
059c9ab24c
4 changed files with 29 additions and 0 deletions
|
|
@ -708,6 +708,12 @@ Methods
|
|||
Returns ``True`` or ``False`` based on a case-insensitive check for a
|
||||
header with the given name.
|
||||
|
||||
.. method:: HttpResponse.setdefault(header, value)
|
||||
|
||||
.. versionadded:: 1.8
|
||||
|
||||
Sets a header unless it has already been set.
|
||||
|
||||
.. method:: HttpResponse.set_cookie(key, value='', max_age=None, expires=None, path='/', domain=None, secure=None, httponly=False)
|
||||
|
||||
Sets a cookie. The parameters are the same as in the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue