Okay, I think I got it: https://gist.github.com/973ccbefe0157efe14c4#file-app_cfg-py-L48 Works for me!
Am Samstag, 26. Januar 2013 17:41:16 UTC+1 schrieb Moritz Schlarb: > > Hi there again, > > I tried completely disabling the SessionMiddleware using: > > class SauceAppConfig(AppConfig): > def add_core_middleware(self, app): > app = RoutesMiddleware(app, config['routes.map']) > # app = SessionMiddleware(app, config) > app = CacheMiddleware(app, config) > return app > > base_config = SauceAppConfig() > > But then I got : > > URL: http://localhost:8080/ > [...] > File > '/home/moschlar/src/virtualenv/sauce/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/wsgiapp.py', > > line 107 in __call__ > response = self.dispatch(controller, environ, start_response) > File > '/home/moschlar/src/virtualenv/sauce/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/wsgiapp.py', > > line 312 in dispatch > return controller(environ, start_response) > File '/home/moschlar/workspace/SAUCE/sauce/lib/base.py', line 111 in > __call__ > return super(BaseController, self).__call__(environ, start_response) > File > '/home/moschlar/src/virtualenv/sauce/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/controllers/core.py', > > line 211 in __call__ > response = self._dispatch_call() > File > '/home/moschlar/src/virtualenv/sauce/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/controllers/core.py', > > line 162 in _dispatch_call > response = self._inspect_call(func) > File > '/home/moschlar/src/virtualenv/sauce/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/controllers/core.py', > > line 105 in _inspect_call > result = self._perform_call(func, args) > File > '/home/moschlar/src/virtualenv/sauce/lib/python2.7/site-packages/TurboGears2-2.1.5-py2.7.egg/tg/controllers/dispatcher.py', > > line 234 in _perform_call > setup_i18n() > File > '/home/moschlar/src/virtualenv/sauce/lib/python2.7/site-packages/TurboGears2-2.1.5-py2.7.egg/tg/i18n.py', > > line 45 in setup_i18n > session_ = pylons.session._current_obj() > File > '/home/moschlar/src/virtualenv/sauce/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/registry.py', > > line 197 in _current_obj > 'thread' % self.____name__) > TypeError: No object (name: session) has been registered for this thread > > Any ideas on sufficiently faking a session for i18n without really using > sessions? > > Regards, > Moritz > -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/turbogears?hl=en. For more options, visit https://groups.google.com/groups/opt_out.

