Add the jinja2 extension to the jinja loader
authorChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 12 May 2011 14:18:53 +0000 (09:18 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 12 May 2011 14:18:53 +0000 (09:18 -0500)
mediagoblin/util.py

index 8695180a0c0b73519807b1bcc79266b0c258861b..63f0f9c5045c37cd2074781a2bd19b852e2e4671 100644 (file)
@@ -48,7 +48,9 @@ def get_jinja_env(user_template_path=None):
     else:
         loader = jinja2.PackageLoader('mediagoblin', 'templates')
 
-    return jinja2.Environment(loader=loader, autoescape=True)
+    return jinja2.Environment(
+        loader=loader, autoescape=True,
+        extensions=['jinja2.ext.i18n'])
 
 
 def setup_user_in_request(request):
@@ -180,3 +182,4 @@ def send_email(from_addr, to_addrs, subject, message_body):
 
     else:
         return mhost.sendmail(from_addr, to_addrs, message.as_string())
+