diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-08-14 15:08:49 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-08-14 15:08:49 -0500 |
commit | 7949d88a751e52a2e0aef42e4801e17283556467 (patch) | |
tree | d76df995d33b18acdaea87942f37e40ea3dc6f93 /mediagoblin/tools | |
parent | 135dd5296b16a8612a787e8beca28ea805e32583 (diff) | |
download | mediagoblin-7949d88a751e52a2e0aef42e4801e17283556467.tar.lz mediagoblin-7949d88a751e52a2e0aef42e4801e17283556467.tar.xz mediagoblin-7949d88a751e52a2e0aef42e4801e17283556467.zip |
Avoiding the celery warnings that we seem to be confusing people lately.
Basically, it's shuffling around the notifications stuff.
This commit sponsored by Günter Kraft. Thank you!
Diffstat (limited to 'mediagoblin/tools')
-rw-r--r-- | mediagoblin/tools/template.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mediagoblin/tools/template.py b/mediagoblin/tools/template.py index 4c634ea2..3cc058c9 100644 --- a/mediagoblin/tools/template.py +++ b/mediagoblin/tools/template.py @@ -32,7 +32,6 @@ from mediagoblin.tools.timesince import timesince from mediagoblin.meddleware.csrf import render_csrf_form_token - SETUP_JINJA_ENVS = {} @@ -90,6 +89,14 @@ def get_jinja_env(template_loader, locale): template_env.globals = hook_transform( 'template_global_context', template_env.globals) + #### THIS IS TEMPORARY, PLEASE FIX IT + ## Notifications stuff is not yet a plugin (and we're not sure it will be), + ## but it needs to add stuff to the context. This is THE WRONG WAY TO DO IT + from mediagoblin import notifications + template_env.globals['get_notifications'] = notifications.get_notifications + template_env.globals[ + 'get_comment_subscription'] = notifications.get_comment_subscription + if exists(locale): SETUP_JINJA_ENVS[locale] = template_env |