source: cowsserver/trunk/lib/cowsserver/lib/base.py @ 6395

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cowsserver/trunk/lib/cowsserver/lib/base.py@6395
Revision 6395, 1.4 KB checked in by pnorton, 11 years ago (diff)

Changed the cows imports to reflect the new class positions.

Line 
1"""The base Controller API
2
3Provides the BaseController class for subclassing, and other objects
4utilized by Controllers.
5"""
6from pylons import c, cache, config, g, request, response, session
7from pylons.controllers import WSGIController
8from pylons.controllers.util import abort, etag_cache, redirect_to
9from pylons.decorators import jsonify, validate
10from pylons.i18n import _, ungettext, N_
11from pylons.templating import render
12
13import cowsserver.lib.helpers as h
14import cowsserver.model as model
15from cows.service.imps.csmlbackend import getGlobalCSMLConnector
16
17globalCSMLConnector = getGlobalCSMLConnector()
18
19from cows.pylons.ows_controller import templateLoader
20
21from genshi.template import TemplateLoader
22from pkg_resources import resource_filename
23
24csTemplateLoader = TemplateLoader(
25    resource_filename('cowsserver', 'templates'),
26    auto_reload=True,
27    )
28
29class BaseController(WSGIController):
30
31    def __call__(self, environ, start_response):
32        """Invoke the Controller"""
33        # WSGIController.__call__ dispatches to the Controller method
34        # the request is routed to. This routing information is
35        # available in environ['pylons.routes_dict']
36        return WSGIController.__call__(self, environ, start_response)
37
38# Include the '_' function in the public names
39__all__ = [__name for __name in locals().keys() if not __name.startswith('_') \
40           or __name == '_']
Note: See TracBrowser for help on using the repository browser.