aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/app.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-05-12 15:17:07 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-05-12 15:17:07 -0500
commit0e0e3d9aadd481353c9a4a44b37dcb68c1efbaab (patch)
tree9c11b4d427f08c8d303ff3258e521f64cdd08ebc /mediagoblin/app.py
parentf62ccaac15728cca6dfef40ebc3c63b367f38cbf (diff)
downloadmediagoblin-0e0e3d9aadd481353c9a4a44b37dcb68c1efbaab.tar.lz
mediagoblin-0e0e3d9aadd481353c9a4a44b37dcb68c1efbaab.tar.xz
mediagoblin-0e0e3d9aadd481353c9a4a44b37dcb68c1efbaab.zip
Separation between setting up the template env and the template loader
for a glorious future where we have gettext in template context
Diffstat (limited to 'mediagoblin/app.py')
-rw-r--r--mediagoblin/app.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mediagoblin/app.py b/mediagoblin/app.py
index 2a2f21cc..d124558d 100644
--- a/mediagoblin/app.py
+++ b/mediagoblin/app.py
@@ -40,7 +40,7 @@ class MediaGoblinApp(object):
email_sender_address, email_debug_mode,
user_template_path=None):
# Get the template environment
- self.template_env = util.get_jinja_env(user_template_path)
+ self.template_loader = util.get_jinja_loader(user_template_path)
# Set up storage systems
self.public_store = public_store
@@ -103,7 +103,10 @@ class MediaGoblinApp(object):
# Attach self as request.app
# Also attach a few utilities from request.app for convenience?
request.app = self
- request.template_env = self.template_env
+ request.locale = util.get_locale_from_request(request)
+
+ request.template_env = util.get_jinja_env(
+ self.template_loader, request.locale)
request.db = self.db
request.staticdirect = self.staticdirector