diff options
Diffstat (limited to 'mediagoblin/util.py')
-rw-r--r-- | mediagoblin/util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mediagoblin/util.py b/mediagoblin/util.py index 91fbee0a..a20e87c4 100644 --- a/mediagoblin/util.py +++ b/mediagoblin/util.py @@ -32,6 +32,7 @@ from lxml.html.clean import Cleaner import markdown from mediagoblin import mg_globals +from mediagoblin import messages from mediagoblin.db.util import ObjectId TESTS_ENABLED = False @@ -104,6 +105,10 @@ def get_jinja_env(template_loader, locale): mg_globals.translations.gettext, mg_globals.translations.ngettext) + # All templates will know how to ... + # ... fetch all waiting messages and remove them from the queue + template_env.globals['fetch_messages'] = messages.fetch_messages + if exists(locale): SETUP_JINJA_ENVS[locale] = template_env |