req, cookie[, value, attributes]) |
This function will also set "Cache-Control: no-cache="set-cookie"" header to inform caches that the cookie value should not be cached.
Here is one way to use this function:
c = Cookie.Cookie('spam', 'eggs', expires=time.time()+300) Cookie.add_cookie(req, c)
Cookie.add_cookie(req, 'spam', 'eggs', expires=time.time()+300)
req [, Class, data]) |
Cookie
. Data
can be any number of keyword arguments which, will be passed to
parse() (This is useful for signedCookie and
MarshalCookie which require secret
as an additional
argument to parse).