[Mpuls-commits] r1532 - wasko/branches/2.0/mpulsweb/config
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Feb 12 14:08:58 CET 2010
Author: torsten
Date: 2010-02-12 14:08:57 +0100 (Fri, 12 Feb 2010)
New Revision: 1532
Modified:
wasko/branches/2.0/mpulsweb/config/middleware.py
Log:
* mpulsweb/config/middleware.py (make_app): Set locale on application
init.
Modified: wasko/branches/2.0/mpulsweb/config/middleware.py
===================================================================
--- wasko/branches/2.0/mpulsweb/config/middleware.py 2010-02-12 11:18:30 UTC (rev 1531)
+++ wasko/branches/2.0/mpulsweb/config/middleware.py 2010-02-12 13:08:57 UTC (rev 1532)
@@ -1,6 +1,7 @@
"""Pylons middleware initialization"""
import sys
import logging
+import locale
from beaker.middleware import CacheMiddleware, SessionMiddleware
from paste.cascade import Cascade
@@ -98,9 +99,10 @@
# Configure the Pylons environment
load_environment(global_conf, app_conf)
+ # Set locale
+ locale.setlocale(locale.LC_ALL, global_conf.get('locale', 'de_DE'))
# The Pylons WSGI app
app = MyPylonsApp()
- #app = PylonsApp()
# Routing/Session/Cache Middleware
app = RoutesMiddleware(app, config['routes.map'])
More information about the Mpuls-commits
mailing list