Back to index

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

List of all members.

Public Member Functions

def __init__
def is_valid_key
def generate_key
def new
def save
def save_if_modified
def delete
def get

Public Attributes

 session_class

Detailed Description

Baseclass for all session stores.  The Werkzeug contrib module does not
implement any useful stores besides the filesystem store, application
developers are encouraged to create their own stores.

:param session_class: The session class to use.  Defaults to
                      :class:`Session`.

Definition at line 131 of file sessions.py.


Constructor & Destructor Documentation

def MoinMoin.support.werkzeug.contrib.sessions.SessionStore.__init__ (   self,
  session_class = None 
)

Definition at line 140 of file sessions.py.

00140 
00141     def __init__(self, session_class=None):
00142         if session_class is None:
00143             session_class = Session
00144         self.session_class = session_class


Member Function Documentation

Delete a session.

Reimplemented in MoinMoin.support.werkzeug.contrib.sessions.FilesystemSessionStore.

Definition at line 165 of file sessions.py.

00165 
00166     def delete(self, session):
00167         """Delete a session."""

Simple function that generates a new session key.

Definition at line 149 of file sessions.py.

00149 
00150     def generate_key(self, salt=None):
00151         """Simple function that generates a new session key."""
00152         return generate_key(salt)

Here is the caller graph for this function:

Get a session for this sid or a new session object.  This method
has to check if the session key is valid and create a new session if
that wasn't the case.

Reimplemented in MoinMoin.support.werkzeug.contrib.sessions.FilesystemSessionStore.

Definition at line 168 of file sessions.py.

00168 
00169     def get(self, sid):
00170         """Get a session for this sid or a new session object.  This method
00171         has to check if the session key is valid and create a new session if
00172         that wasn't the case.
00173         """
00174         return self.session_class({}, sid, True)
00175 

Here is the caller graph for this function:

Check if a key has the correct format.

Definition at line 145 of file sessions.py.

00145 
00146     def is_valid_key(self, key):
00147         """Check if a key has the correct format."""
00148         return _sha1_re.match(key) is not None

Here is the caller graph for this function:

Generate a new session.

Definition at line 153 of file sessions.py.

00153 
00154     def new(self):
00155         """Generate a new session."""
00156         return self.session_class({}, self.generate_key(), True)

Here is the call graph for this function:

Here is the caller graph for this function:

Save a session.

Reimplemented in MoinMoin.support.werkzeug.contrib.sessions.FilesystemSessionStore.

Definition at line 157 of file sessions.py.

00157 
00158     def save(self, session):
00159         """Save a session."""

Here is the caller graph for this function:

Save if a session class wants an update.

Definition at line 160 of file sessions.py.

00160 
00161     def save_if_modified(self, session):
00162         """Save if a session class wants an update."""
00163         if session.should_save:
00164             self.save(session)

Here is the call graph for this function:


Member Data Documentation

Definition at line 143 of file sessions.py.


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