summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2013-09-06 15:06:57 -0700
committerRussell Keith-Magee <russell@keith-magee.com>2013-09-06 15:06:57 -0700
commit122020fdb93980df850ae02f61d97da27e2cb515 (patch)
treebb728cfc74aa48e079a0d09eeb77e7724d3e17f6 /django
parente844e10b4f06c13d24d405fe0d2e80a23d260508 (diff)
parente12de0ac0485d8799d08fda556b66399c6f89fc9 (diff)
Merge pull request #1579 from ianawilson/ticket_21058
Fixed #21058 -- Fixed debug view blowing up when no template is provided to the template rendering functions. Assistance on this commit from @jambonrose.
Diffstat (limited to 'django')
-rw-r--r--django/views/debug.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/views/debug.py b/django/views/debug.py
index 16f75df8c3..6a0f81876e 100644
--- a/django/views/debug.py
+++ b/django/views/debug.py
@@ -233,6 +233,10 @@ class ExceptionReporter(object):
from django.template.loader import template_source_loaders
self.template_does_not_exist = True
self.loader_debug_info = []
+ # If the template_source_loaders haven't been populated yet, you need
+ # to provide an empty list for this for loop to not fail.
+ if template_source_loaders is None:
+ template_source_loaders = []
for loader in template_source_loaders:
try:
source_list_func = loader.get_template_sources