﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27783	VariableDoesNotExist can lead to stack overflows unusually easily	Ryan O’Hara	Ryan O’Hara	"If a form is overridden to render a template ([https://github.com/gregmuellegger/django-floppyforms django-floppyforms] does this):

{{{
class ExampleForm(forms.Form):
    def as_table(self):
        return render(None, 'example.html', {'form': self})
}}}

and the template refers to a nonexistent attribute on the form:

{{{
{{ form.boom }}
}}}

printing the `VariableDoesNotExist` will cause it to attempt to stringify the form for context again.

Tentative patch changes it to always `repr()`, which seems appropriate and has the advantage of showing dict context like this:

{{{
Failed lookup for key [author] in {'section': '""News""'}
}}}

instead of like this:

{{{
Failed lookup for key [author] in '{\'section\': \'""News""\'}'
}}}"	Bug	closed	Template system	1.10	Normal	fixed			Accepted	1	0	0	0	0	0
