1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #27584 -- Fixed display of render time template errors.

This commit is contained in:
Preston Timmons
2016-12-13 20:35:21 -06:00
committed by Tim Graham
parent 5e239ae907
commit 0b4d517263
6 changed files with 45 additions and 5 deletions

View File

@@ -114,6 +114,17 @@ class TemplateTests(SimpleTestCase):
engine.from_string("{% load bad_tag %}{% badtag %}")
self.assertEqual(e.exception.template_debug['during'], '{% badtag %}')
def test_compile_tag_error_27584(self):
engine = Engine(
app_dirs=True,
debug=True,
libraries={'tag_27584': 'template_tests.templatetags.tag_27584'},
)
t = engine.get_template('27584_parent.html')
with self.assertRaises(TemplateSyntaxError) as e:
t.render(Context())
self.assertEqual(e.exception.template_debug['during'], '{% badtag %}')
def test_super_errors(self):
"""
#18169 -- NoReverseMatch should not be silence in block.super.