From: Christopher Allan Webber Date: Thu, 12 May 2011 14:18:53 +0000 (-0500) Subject: Add the jinja2 extension to the jinja loader X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=20c834ffe409c55e7e9dc6e4110f90f7dd177f35;p=mediagoblin.git Add the jinja2 extension to the jinja loader --- diff --git a/mediagoblin/util.py b/mediagoblin/util.py index 8695180a..63f0f9c5 100644 --- a/mediagoblin/util.py +++ b/mediagoblin/util.py @@ -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()) +