Show More
@@ -1,19 +1,19 b'' | |||||
1 | """The base Controller API |
|
1 | """The base Controller API | |
2 |
|
2 | |||
3 | Provides the BaseController class for subclassing. |
|
3 | Provides the BaseController class for subclassing. | |
4 | """ |
|
4 | """ | |
5 | from pylons.controllers import WSGIController |
|
5 | from pylons.controllers import WSGIController | |
6 | from pylons.templating import render_mako as render |
|
6 | from pylons.templating import render_mako as render | |
7 | from pylons_app.model import meta |
|
7 | from pylons_app.model import meta | |
8 |
|
8 | |||
9 | class BaseController(WSGIController): |
|
9 | class BaseController(WSGIController): | |
10 |
|
10 | |||
11 | def __call__(self, environ, start_response): |
|
11 | def __call__(self, environ, start_response): | |
12 | """Invoke the Controller""" |
|
12 | """Invoke the Controller""" | |
13 | # WSGIController.__call__ dispatches to the Controller method |
|
13 | # WSGIController.__call__ dispatches to the Controller method | |
14 | # the request is routed to. This routing information is |
|
14 | # the request is routed to. This routing information is | |
15 | # available in environ['pylons.routes_dict'] |
|
15 | # available in environ['pylons.routes_dict'] | |
16 | try: |
|
16 | try: | |
17 | return WSGIController.__call__(self, environ, start_response) |
|
17 | return WSGIController.__call__(self, environ, start_response) | |
18 | finally: |
|
18 | finally: | |
19 |
|
|
19 | meta.Session.remove() |
General Comments 0
You need to be logged in to leave comments.
Login now