The problem is that all parameters are supposed to be indented to the same level. That includes any parameter(s) on the initial function call line.
So, while you could fix it like this:
return render_to_response('foo/page.html',
{
'situations': situations,
'active': active_req,
},
context_instance=RequestContext(request))
… that'll usually just make you run afoul of the 80-column rule, and will certainly make your code uglier even if pep8
doesn't complain. What you probably want is this:
return render_to_response(
'foo/page.html',
{
'situations': situations,
'active': active_req,
},
context_instance=RequestContext(request))
Or, of course, you could just break up your giant expression:
d = {
'situations': situations,
'active': active_req,
}
context = RequestContext(request)
return render_to_response('foo/page.html', d, context_instance=context)