source: cowsclient/tags/1.6.0-py2.6/cowsclient/lib/base.py @ 7593

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cowsclient/tags/1.6.0-py2.6/cowsclient/lib/base.py@7593
Revision 7593, 1.1 KB checked in by astephen, 10 years ago (diff)

Tagged version updated to be compatible with:

  • python 2.6
  • pylons 1.0
Line 
1"""The base Controller API
2
3Provides the BaseController class for subclassing, and other objects
4utilized by Controllers.
5"""
6from pylons import cache, config, request, response, session
7from pylons import tmpl_context as c
8from pylons.controllers import WSGIController
9from pylons.controllers.util import abort, etag_cache, redirect
10from pylons.decorators import jsonify, validate
11from pylons.i18n import ungettext, N_
12from pylons.templating import render_genshi as render
13
14import cowsclient.lib.helpers as h
15import cowsclient.model as model
16
17# To simplify upgrading to Pylons-1.0
18app_globals = config['pylons.app_globals']
19
20class BaseController(WSGIController):
21
22    def __call__(self, environ, start_response):
23        """Invoke the Controller"""
24        # WSGIController.__call__ dispatches to the Controller method
25        # the request is routed to. This routing information is
26        # available in environ['pylons.routes_dict']
27
28        return WSGIController.__call__(self, environ, start_response)
29
30# Include the '_' function in the public names
31__all__ = [__name for __name in locals().keys() if not __name.startswith('_') \
32           or __name == '_']
Note: See TracBrowser for help on using the repository browser.