hi,

I've been writing a django-application and now I need the
RequestContext for some new features. I don't want to add
context_instance=RequestContext(request) to each render_to_response
call manually in my views.py.

How can I can I solve my problem?

I could do this with retrieving the request-object and do something
like this:

from django.shortcuts import render_to_response as _render_to_response
from django.template import RequestContext
from django.anywher import request

def render_to_response(*args, **kwargs):
    kwargs['context_instance'] = RequestContext(request)
    return _render_to_response(*args, **kwargs)

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to