Wednesday, February 22, 2012

TemplateResponse way of handling RequestContext

Hi,

I was working around with middleware to use process_template_response
which is triggered when a view returns a TemplateReponse obj. I simply
tried using TemplateReponse to replace render_to_response so that i
get a handle of my view data in the middleware definition
process_template_response whichy i otherwise dont get in case i use
render_to_response.

What I cant understand is how does TemplateResponse handle context
processing. Unlike render_to_response i dont see any option of passing
RequestContext(request) as a third argument to my TemplateResponse
call.

Suggest me if anyone figures this out.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment