mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #27783 -- Switched VariableDoesNotExist.__str__() to repr() context.
Using __str__() and then repr'ing the result looks strange and can lead to recursive rendering of forms.
This commit is contained in:
@@ -75,7 +75,7 @@ class VariableResolveLoggingTests(BaseTemplateLoggingTestCase):
|
||||
raised_exception = self.test_handler.log_record.exc_info[1]
|
||||
self.assertEqual(
|
||||
str(raised_exception),
|
||||
'Failed lookup for key [author] in %r' % ("{%r: %r}" % ('section', 'News'))
|
||||
"Failed lookup for key [author] in {'section': 'News'}"
|
||||
)
|
||||
|
||||
def test_no_log_when_variable_exists(self):
|
||||
|
||||
Reference in New Issue
Block a user