1
0
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:
Tim Graham
2015-02-08 13:44:07 -05:00
parent 0ab8ec4312
commit 7b5aa20a28
2 changed files with 15 additions and 2 deletions

View File

@@ -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: