﻿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
17778	RequestContext methods pollute template variables	KyleMac	Tim Graham <timograham@…>	"Imagine the following simple view:

{{{
def index(request):
    return render_to_response('template.html', {
        'myvar': 'My Variable'
    }, context_instance=RequestContext(request))
}}}

And the following simple template:
    
{{{
{{ myvar }} is {% if not new %}not {% endif %}new.
}}}

The output will always be:
  
{{{
My Variable is new.
}}}

This is because django.template.base.Variable._resolve_lookup is finding the new() method on RequestContext which is then forced to a string resulting in ""[{}]"".

If you're asking why you want to access a variable that the view never sets then the reason is that this situation can occur when views are including or extending the same template."	Bug	closed	Template system	1.4-beta-1	Normal	fixed	sprint2013		Accepted	1	0	0	0	0	0
