mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Fixed #31982 -- Made HttpResponse.set_cookie() cast max_age argument to an integer.
This commit is contained in:
parent
e6b5108acc
commit
d2d08c8cf6
3 changed files with 8 additions and 3 deletions
|
@ -834,8 +834,8 @@ Methods
|
|||
Sets a cookie. The parameters are the same as in the
|
||||
:class:`~http.cookies.Morsel` cookie object in the Python standard library.
|
||||
|
||||
* ``max_age`` should be a number of seconds, or ``None`` (default) if
|
||||
the cookie should last only as long as the client's browser session.
|
||||
* ``max_age`` should be an integer number of seconds, or ``None`` (default)
|
||||
if the cookie should last only as long as the client's browser session.
|
||||
If ``expires`` is not specified, it will be calculated.
|
||||
* ``expires`` should either be a string in the format
|
||||
``"Wdy, DD-Mon-YY HH:MM:SS GMT"`` or a ``datetime.datetime`` object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue