Skip to content

Commit

Permalink
Fixed use of django-missing. Template context was not passed along.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar committed Jun 3, 2012
1 parent c35d980 commit ea0b496
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions 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
Expand Down Expand Up @@ -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.