fd6ee47f2af0890a8f7cd4324b3d12cb42f49cd1
[zzz-floof.git] / floof / 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_mako as render
7
8 from floof.model import meta
9
10 class BaseController(WSGIController):
11
12 def __call__(self, environ, start_response):
13 """Invoke the Controller"""
14 # WSGIController.__call__ dispatches to the Controller method
15 # the request is routed to. This routing information is
16 # available in environ['pylons.routes_dict']
17 try:
18 return WSGIController.__call__(self, environ, start_response)
19 finally:
20 meta.Session.remove()