diff --git a/django/views/debug.py b/django/views/debug.py
index d1e9259..f9e373b 100644
a
|
b
|
import sys
|
4 | 4 | import datetime |
5 | 5 | |
6 | 6 | from django.conf import settings |
7 | | from django.template import Template, Context, TemplateDoesNotExist |
| 7 | from django.template import Template, Context, TemplateDoesNotExist, Origin |
8 | 8 | from django.utils.html import escape |
9 | 9 | from django.http import HttpResponse, HttpResponseServerError, HttpResponseNotFound |
10 | 10 | from django.utils.encoding import smart_unicode, smart_str |
… |
… |
class ExceptionReporter:
|
78 | 78 | 'loader': loader.__module__ + '.' + loader.__name__, |
79 | 79 | 'templates': template_list, |
80 | 80 | }) |
81 | | if settings.TEMPLATE_DEBUG and hasattr(self.exc_value, 'source'): |
82 | | self.get_template_exception_info() |
| 81 | if settings.TEMPLATE_DEBUG and hasattr(self.exc_value, 'source') and \ |
| 82 | isinstance(self.exc_value.source, (list, tuple)) and \ |
| 83 | len(self.exc_value.source)==2 and isinstance(self.exc_value[0], Origin): |
| 84 | self.get_template_exception_info() |
83 | 85 | |
84 | 86 | frames = self.get_traceback_frames() |
85 | 87 | |