summaryrefslogtreecommitdiff
path: root/django/views/debug.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/views/debug.py')
-rw-r--r--django/views/debug.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/django/views/debug.py b/django/views/debug.py
index 16c9ad7fc8..2a4593e87e 100644
--- a/django/views/debug.py
+++ b/django/views/debug.py
@@ -545,8 +545,9 @@ def technical_404_response(request, exception):
obj = resolver_match.func
if hasattr(obj, 'view_class'):
- caller = obj.view_class
- elif hasattr(obj, '__name__'):
+ obj = obj.view_class
+
+ if hasattr(obj, '__name__'):
caller = obj.__name__
elif hasattr(obj, '__class__') and hasattr(obj.__class__, '__name__'):
caller = obj.__class__.__name__