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

Fixed #26280 -- Fixed cached template loader crash when loading nonexistent template.

This commit is contained in:
Ivan Tsouvarev
2016-02-26 09:49:02 +03:00
committed by Tim Graham
parent eb44172760
commit 8890c533e0
3 changed files with 16 additions and 1 deletions

View File

@@ -131,7 +131,7 @@ class Loader(BaseLoader):
template_tuple = self.template_cache.get(key)
# A cached previous failure:
if template_tuple is TemplateDoesNotExist:
raise TemplateDoesNotExist
raise TemplateDoesNotExist(template_name)
elif template_tuple is None:
template, origin = self.find_template(template_name, template_dirs)
if not hasattr(template, 'render'):