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.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/views/debug.py b/django/views/debug.py
index e2f9ffe3e2..36abaf3121 100644
--- a/django/views/debug.py
+++ b/django/views/debug.py
@@ -517,7 +517,9 @@ def technical_404_response(request, exception):
else:
obj = resolver_match.func
- if hasattr(obj, '__name__'):
+ if hasattr(obj, 'view_class'):
+ caller = obj.view_class
+ elif hasattr(obj, '__name__'):
caller = obj.__name__
elif hasattr(obj, '__class__') and hasattr(obj.__class__, '__name__'):
caller = obj.__class__.__name__