mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.8.x] Fixed #17716 -- Prevented include('...', app_name='...') without a namespace.
Backport of 27eeb64a96 from master
This commit is contained in:
@@ -17,6 +17,9 @@ handler500 = 'django.views.defaults.server_error'
|
||||
|
||||
|
||||
def include(arg, namespace=None, app_name=None):
|
||||
if app_name and not namespace:
|
||||
raise ValueError('Must specify a namespace if specifying app_name.')
|
||||
|
||||
if isinstance(arg, tuple):
|
||||
# callable returning a namespace hint
|
||||
if namespace:
|
||||
|
||||
Reference in New Issue
Block a user