Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes
MoinMoin.support.werkzeug.contrib.kickstart.Request Class Reference

List of all members.

Public Member Functions

def __init__
def url_for

Public Attributes

 url_adapter
 session_store
 cookie_name
 session

Detailed Description

A handy subclass of the base request that adds a URL builder.
It when supplied a session store, it is also able to handle sessions.

Definition at line 38 of file kickstart.py.


Constructor & Destructor Documentation

def MoinMoin.support.werkzeug.contrib.kickstart.Request.__init__ (   self,
  environ,
  url_map,
  session_store = None,
  cookie_name = None 
)

Definition at line 44 of file kickstart.py.

00044 
00045             session_store=None, cookie_name=None):
00046         # call the parent for initialization
00047         RequestBase.__init__(self, environ)
00048         # create an adapter
00049         self.url_adapter = url_map.bind_to_environ(environ)
00050         # create all stuff for sessions
00051         self.session_store = session_store
00052         self.cookie_name = cookie_name
00053 
00054         if session_store is not None and cookie_name is not None:
00055             if cookie_name in self.cookies:
00056                 # get the session out of the storage
00057                 self.session = session_store.get(self.cookies[cookie_name])
00058             else:
00059                 # create a new session
00060                 self.session = session_store.new()


Member Function Documentation

def MoinMoin.support.werkzeug.contrib.kickstart.Request.url_for (   self,
  callback,
  values 
)

Definition at line 61 of file kickstart.py.

00061 
00062     def url_for(self, callback, **values):
00063         return self.url_adapter.build(callback, values)
00064 


Member Data Documentation

Definition at line 51 of file kickstart.py.

Definition at line 56 of file kickstart.py.

Definition at line 50 of file kickstart.py.

Definition at line 48 of file kickstart.py.


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