Show More
@@ -3,7 +3,7 b'' | |||||
3 | Provides the BaseController class for subclassing. |
|
3 | Provides the BaseController class for subclassing. | |
4 | """ |
|
4 | """ | |
5 | import logging |
|
5 | import logging | |
6 |
|
6 | import time | ||
7 | from pylons import config, tmpl_context as c, request, session, url |
|
7 | from pylons import config, tmpl_context as c, request, session, url | |
8 | from pylons.controllers import WSGIController |
|
8 | from pylons.controllers import WSGIController | |
9 | from pylons.controllers.util import redirect |
|
9 | from pylons.controllers.util import redirect | |
@@ -39,6 +39,7 b' class BaseController(WSGIController):' | |||||
39 | # WSGIController.__call__ dispatches to the Controller method |
|
39 | # WSGIController.__call__ dispatches to the Controller method | |
40 | # the request is routed to. This routing information is |
|
40 | # the request is routed to. This routing information is | |
41 | # available in environ['pylons.routes_dict'] |
|
41 | # available in environ['pylons.routes_dict'] | |
|
42 | start = time.time() | |||
42 | try: |
|
43 | try: | |
43 | # putting this here makes sure that we update permissions each time |
|
44 | # putting this here makes sure that we update permissions each time | |
44 | api_key = request.GET.get('api_key') |
|
45 | api_key = request.GET.get('api_key') | |
@@ -51,6 +52,7 b' class BaseController(WSGIController):' | |||||
51 | session.save() |
|
52 | session.save() | |
52 | return WSGIController.__call__(self, environ, start_response) |
|
53 | return WSGIController.__call__(self, environ, start_response) | |
53 | finally: |
|
54 | finally: | |
|
55 | log.debug('Request time: %.3fs' % (time.time()-start)) | |||
54 | meta.Session.remove() |
|
56 | meta.Session.remove() | |
55 |
|
57 | |||
56 |
|
58 |
General Comments 0
You need to be logged in to leave comments.
Login now