1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

adds fix and test for when a template is not specified at all to render(). fixes #21058. by jambonrose and ianawilson

This commit is contained in:
Ian Wilson
2013-09-06 15:50:18 -05:00
parent 630eb0564a
commit 9b7f4aab32
5 changed files with 21 additions and 0 deletions

View File

@@ -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