diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py index fc8baf9611..26ff986b6d 100644 --- a/django/template/defaulttags.py +++ b/django/template/defaulttags.py @@ -472,8 +472,10 @@ class URLNode(Node): def render(self, context): from django.core.urlresolvers import reverse, NoReverseMatch args = [arg.resolve(context) for arg in self.args] - kwargs = dict((smart_text(k, 'ascii'), v.resolve(context)) - for k, v in self.kwargs.items()) + kwargs = { + smart_text(k, 'ascii'): v.resolve(context) + for k, v in self.kwargs.items() + } view_name = self.view_name.resolve(context)