mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Change exception type to reduce confusion.
TemplateSyntaxError is expected at compile time, not at run time. Refs #19280.
This commit is contained in:
		| @@ -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, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user