/usr/share/doc/python-werkzeug-doc/html/_sources/contrib/sessions.rst.txt is in python-werkzeug-doc 0.14.1+dfsg1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | ========
Sessions
========
.. automodule:: werkzeug.contrib.sessions
.. testsetup::
from werkzeug.contrib.sessions import *
Reference
=========
.. autoclass:: Session
.. attribute:: sid
The session ID as string.
.. attribute:: new
`True` is 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 session:
>>> c = Session({}, sid='deadbeefbabe2c00ffee')
>>> 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.
.. autoattribute:: should_save
.. autoclass:: SessionStore
:members:
.. autoclass:: FilesystemSessionStore
:members: list
.. autoclass:: SessionMiddleware
|