Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Static Private Attributes
MoinMoin.support.werkzeug.contrib.sessions.Session Class Reference
Inheritance diagram for MoinMoin.support.werkzeug.contrib.sessions.Session:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.support.werkzeug.contrib.sessions.Session:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __repr__
def should_save
def copy
def __copy__

Public Attributes

 sid
 new
 modified

Static Private Attributes

tuple __slots__ = ModificationTrackingDict.__slots__+('sid', 'new')

Detailed Description

Subclass of a dict that keeps track of direct object changes.  Changes
in mutable structures are not tracked, for those you have to set
`modified` to `True` by hand.

Definition at line 106 of file sessions.py.


Constructor & Destructor Documentation

def MoinMoin.support.werkzeug.contrib.sessions.Session.__init__ (   self,
  data,
  sid,
  new = False 
)

Definition at line 113 of file sessions.py.

00113 
00114     def __init__(self, data, sid, new=False):
00115         ModificationTrackingDict.__init__(self, data)
00116         self.sid = sid
00117         self.new = new


Member Function Documentation

Definition at line 102 of file sessions.py.

00102 
00103     def __copy__(self):
00104         return self.copy()
00105 

Here is the call graph for this function:

Definition at line 118 of file sessions.py.

00118 
00119     def __repr__(self):
00120         return '<%s %s%s>' % (
00121             self.__class__.__name__,
00122             dict.__repr__(self),
00123             self.should_save and '*' or ''
00124         )

Here is the call graph for this function:

Create a flat copy of the dict.

Definition at line 92 of file sessions.py.

00092 
00093     def copy(self):
00094         """Create a flat copy of the dict."""
00095         missing = object()
00096         result = object.__new__(self.__class__)
00097         for name in self.__slots__:
00098             val = getattr(self, name, missing)
00099             if val is not missing:
00100                 setattr(result, name, val)
00101         return result

Here is the caller graph for this function:

True if the session should be saved.

Definition at line 126 of file sessions.py.

00126 
00127     def should_save(self):
00128         """True if the session should be saved."""
00129         return self.modified or self.new
00130 

Here is the caller graph for this function:


Member Data Documentation

Definition at line 87 of file sessions.py.

Definition at line 116 of file sessions.py.

Definition at line 115 of file sessions.py.


The documentation for this class was generated from the following file: