From f6e7c6521df151fd18875ad518dabb76f1e3779a Mon Sep 17 00:00:00 2001 From: Michael Pfister Date: Fri, 13 Oct 2017 13:03:40 +0200 Subject: [PATCH] #9 use dict instead of Context to work with django >= 1.10 --- social_widgets/templatetags/social_widgets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/social_widgets/templatetags/social_widgets.py b/social_widgets/templatetags/social_widgets.py index 01b89df..e9ff412 100644 --- a/social_widgets/templatetags/social_widgets.py +++ b/social_widgets/templatetags/social_widgets.py @@ -3,7 +3,7 @@ from locale import normalize from django.template import loader, TemplateDoesNotExist -from django.template.base import Node, Context, TemplateSyntaxError +from django.template.base import Node, TemplateSyntaxError from django.utils.encoding import smart_text from django.utils.translation import get_language, to_locale @@ -113,7 +113,7 @@ def render(self, context): try: t = loader.get_template(template) - return t.render(Context(kwargs)) + return t.render(kwargs) except TemplateDoesNotExist: return ''