示例#1
0
    def register_globals(self, environ):
        _PylonsApp.register_globals(self, environ)
        request = environ['pylons.pylons'].request

        if environ['PATH_INFO'] == '/_test_vars':
            # This is a dummy request, probably used inside a test or to build
            # documentation, so we're not guaranteed to have a database
            # connection with which to get the settings.
            request.settings = {
                'intentionally_empty': 'see mediacore.config.middleware',
            }
        else:
            request.settings = self.globals.settings
示例#2
0
    def register_globals(self, environ):
        _PylonsApp.register_globals(self, environ)
        request = environ['pylons.pylons'].request

        if environ['PATH_INFO'] == '/_test_vars':
            # This is a dummy request, probably used inside a test or to build
            # documentation, so we're not guaranteed to have a database
            # connection with which to get the settings.
            request.settings = {
                'intentionally_empty': 'see mediacore.config.middleware',
            }
        else:
            request.settings = self.globals.settings
示例#3
0
 def register_globals(self, environ):
     _PylonsApp.register_globals(self, environ)
     request = environ['pylons.pylons'].request
     request.settings = self.globals.settings
示例#4
0
 def register_globals(self, environ):
     _PylonsApp.register_globals(self, environ)
     request = environ['pylons.pylons'].request
     request.settings = self.globals.settings