summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2013-12-07 03:21:58 +0100
committerBaptiste Mispelon <bmispelon@gmail.com>2013-12-07 03:21:58 +0100
commita020dd0a99da13d0f024d42c46f01d8f503e9d5e (patch)
treec17869df8bf43f0bfb8547bbaf4c793803d64209 /django
parentffc0e0ca3760759688b497ed9f580c3ebd807f80 (diff)
Fixed #21530 -- Prevent AttributeError in default URLconf detection code.
Thanks to @dmyerscoug for the report and original patch and to @alasdairnicol for the added tests.
Diffstat (limited to 'django')
-rw-r--r--django/views/debug.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/views/debug.py b/django/views/debug.py
index 66453fe2c6..8f7f9dc00a 100644
--- a/django/views/debug.py
+++ b/django/views/debug.py
@@ -483,7 +483,7 @@ def technical_404_response(request, exception):
or (request.path == '/'
and len(tried) == 1 # default URLconf
and len(tried[0]) == 1
- and tried[0][0].app_name == tried[0][0].namespace == 'admin')):
+ and getattr(tried[0][0], 'app_name', '') == getattr(tried[0][0], 'namespace', '') == 'admin')):
return default_urlconf(request)
urlconf = getattr(request, 'urlconf', settings.ROOT_URLCONF)