Former-commit-id:133dc97f67
[formerlya02aeb236c
] [formerly9f19e3f712
] [formerly06a8b51d6d
[formerly9f19e3f712
[formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]] Former-commit-id:06a8b51d6d
Former-commit-id:377dcd10b9
[formerly3360eb6c5f
] Former-commit-id:8e80217e59
36 lines
771 B
ReStructuredText
Executable file
36 lines
771 B
ReStructuredText
Executable file
=============
|
|
Secure Cookie
|
|
=============
|
|
|
|
.. automodule:: werkzeug.contrib.securecookie
|
|
|
|
Reference
|
|
=========
|
|
|
|
.. autoclass:: SecureCookie
|
|
:members:
|
|
|
|
.. attribute:: new
|
|
|
|
`True` if the cookie was newly created, otherwise `False`
|
|
|
|
.. attribute:: modified
|
|
|
|
Whenever an item on the cookie is set, this attribute is set to `True`.
|
|
However this does not track modifications inside mutable objects
|
|
in the cookie:
|
|
|
|
>>> c = SecureCookie()
|
|
>>> c["foo"] = [1, 2, 3]
|
|
>>> c.modified
|
|
True
|
|
>>> c.modified = False
|
|
>>> c["foo"].append(4)
|
|
>>> c.modified
|
|
False
|
|
|
|
In that situation it has to be set to `modified` by hand so that
|
|
:attr:`should_save` can pick it up.
|
|
|
|
|
|
.. autoexception:: UnquoteError
|