docs about order of template context processors unclear
|Reported by:||anonymous||Owned by:||Erik Romijn|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If I do:
return render_to_response('my_template.html', my_data_dictionary, context_instance=RequestContext(request))
then my_data_dictionary will override anything added by the context processors.
The docs state:
"When you use RequestContext, the variables you supply directly are added first, followed any variables supplied by context processors. This means that a context processor may overwrite a variable you’ve supplied"
Which seems to relate to this situation:
return render_to_response('my_template.html', context_instance=RequestContext(request, my_data_dictionary))
This seems inconsistent, could there be an extra note added to clarify what happens when my_data_dictionary is passed to render_to_response instead of RequestContext?
Change History (9)
comment:1 Changed 3 years ago by
|Component:||Template system → Documentation|
|Triage Stage:||Unreviewed → Accepted|