Loading django/template/defaulttags.py +2 −2 Original line number Diff line number Diff line Loading @@ -399,8 +399,8 @@ class URLNode(Node): view_name = self.view_name.resolve(context) if not view_name: raise TemplateSyntaxError("'url' takes requires a non-empty first" " argument. The syntax changed in Django 1.5, see the docs.") raise NoReverseMatch("'url' requires a non-empty first argument. " "The syntax changed in Django 1.5, see the docs.") # Try to look up the URL twice: once given the view name, and again # relative to what we guess is the "main" app. If they both fail, Loading tests/regressiontests/templates/tests.py +2 −2 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ except ImportError: # Python 2 from django import template from django.template import (base as template_base, Context, RequestContext, Template, TemplateSyntaxError) Template) from django.core import urlresolvers from django.template import loader from django.template.loaders import app_directories, filesystem, cached Loading Loading @@ -369,7 +369,7 @@ class Templates(TestCase): # Regression test for #19280 t = Template('{% url path.to.view %}') # not quoted = old syntax c = Context() with self.assertRaisesRegexp(TemplateSyntaxError, with self.assertRaisesRegexp(urlresolvers.NoReverseMatch, "The syntax changed in Django 1.5, see the docs."): t.render(c) Loading Loading
django/template/defaulttags.py +2 −2 Original line number Diff line number Diff line Loading @@ -399,8 +399,8 @@ class URLNode(Node): view_name = self.view_name.resolve(context) if not view_name: raise TemplateSyntaxError("'url' takes requires a non-empty first" " argument. The syntax changed in Django 1.5, see the docs.") raise NoReverseMatch("'url' requires a non-empty first argument. " "The syntax changed in Django 1.5, see the docs.") # Try to look up the URL twice: once given the view name, and again # relative to what we guess is the "main" app. If they both fail, Loading
tests/regressiontests/templates/tests.py +2 −2 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ except ImportError: # Python 2 from django import template from django.template import (base as template_base, Context, RequestContext, Template, TemplateSyntaxError) Template) from django.core import urlresolvers from django.template import loader from django.template.loaders import app_directories, filesystem, cached Loading Loading @@ -369,7 +369,7 @@ class Templates(TestCase): # Regression test for #19280 t = Template('{% url path.to.view %}') # not quoted = old syntax c = Context() with self.assertRaisesRegexp(TemplateSyntaxError, with self.assertRaisesRegexp(urlresolvers.NoReverseMatch, "The syntax changed in Django 1.5, see the docs."): t.render(c) Loading