Permalink
Browse files

Fixed use of django-missing. Template context was not passed along.

  • Loading branch information...
1 parent c35d980 commit ea0b4969f64810571476fb8f31fffc195dee6001 @mitar mitar committed Jun 3, 2012
Showing with 7 additions and 5 deletions.
  1. +7 −5 cmsplugin_blog/templatetags/cmsplugin_blog_tags.py
@@ -1,4 +1,4 @@
-import datetime
+import copy, datetime
from django.conf import settings
from django import template
from django.contrib.auth import models as auth_models
@@ -56,8 +56,10 @@ def choose_placeholder(placeholders, placeholder):
return None
-@register.inclusion_tag('admin/cmsplugin_blog/admin_helpers.html')
-def admin_helpers():
- return {
+@register.inclusion_tag('admin/cmsplugin_blog/admin_helpers.html', takes_context=True)
+def admin_helpers(context):
+ context = copy.copy(context)
+ context.update({
'use_missing': 'missing' in settings.INSTALLED_APPS,
- }
+ })
+ return context

0 comments on commit ea0b496

Please sign in to comment.