]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blob - wradmin/wradmin/lib/base.py
c1a36dc65674c682d38f3c062467262d642a7d3c
[philipp/winterrodeln/wradmin.git] / wradmin / wradmin / lib / base.py
1 """The base Controller API
2
3 Provides the BaseController class for subclassing.
4 """
5 from pylons.controllers import WSGIController
6 from pylons.templating import render_genshi as render
7 from wradmin.model import meta
8
9 class BaseController(WSGIController):
10
11     def __call__(self, environ, start_response):
12         """Invoke the Controller"""
13         # WSGIController.__call__ dispatches to the Controller method
14         # the request is routed to. This routing information is
15         # available in environ['pylons.routes_dict']
16         try:
17             return WSGIController.__call__(self, environ, start_response)
18         finally:
19             meta.Session.remove()
20