mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Improved test coverage and error messages for conf.urls.__init__.
This commit is contained in:
		
				
					committed by
					
						 Tim Graham
						Tim Graham
					
				
			
			
				
	
			
			
			
						parent
						
							e07e743e0c
						
					
				
				
					commit
					0cbfc844a3
				
			| @@ -22,12 +22,13 @@ def include(arg, namespace=None): | ||||
|         except ValueError: | ||||
|             if namespace: | ||||
|                 raise ImproperlyConfigured( | ||||
|                     'Cannot override the namespace for a dynamic module that provides a namespace' | ||||
|                     'Cannot override the namespace for a dynamic module that ' | ||||
|                     'provides a namespace.' | ||||
|                 ) | ||||
|             raise ImproperlyConfigured( | ||||
|                 'Passing a 3-tuple to django.conf.urls.include() is not supported. ' | ||||
|                 'Passing a %d-tuple to django.conf.urls.include() is not supported. ' | ||||
|                 'Pass a 2-tuple containing the list of patterns and app_name, ' | ||||
|                 'and provide the namespace argument to include() instead.', | ||||
|                 'and provide the namespace argument to include() instead.' % len(arg) | ||||
|             ) | ||||
|     else: | ||||
|         # No namespace hint - use manually provided namespace | ||||
|   | ||||
		Reference in New Issue
	
	Block a user