Skip to content

Commit

Permalink
Merge 8033549 into cc3694f
Browse files Browse the repository at this point in the history
  • Loading branch information
pacahon committed Sep 22, 2016
2 parents cc3694f + 8033549 commit d40a4e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sitemetrics/templatetags/sitemetrics.py
@@ -1,3 +1,4 @@
import django
from django import template
from django.conf import settings
from django.core.cache import cache
Expand Down Expand Up @@ -92,4 +93,7 @@ def __init__(self, keycodes):
self.template = template.loader.get_template('sitemetrics/sitemetrics.tpl')

def render(self, context):
return self.template.render(template.Context({'keycodes': self.keycodes}))
context = template.Context({'keycodes': self.keycodes})
if django.VERSION >= (1, 8):
context = context.flatten()
return self.template.render(context)

0 comments on commit d40a4e5

Please sign in to comment.