mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user