Is there a way to get direct_to_template to pass RequestContext in django?

Posted by BigJason on Stack Overflow See other posts from Stack Overflow or by BigJason
Published on 2010-05-22T04:16:55Z Indexed on 2010/05/22 4:20 UTC
Read the original article Hit count: 184

I have found myself writing the same view over and over. It is basically this:

def home_index(request):
    return render_to_response('home/index.html', RequestContext(request))

To keep with the dry principal, I would like to utilize a generic view. I have seen direct_to_template, but it passes an empty context. So how can I use a generic view and still get the power of RequestContext?

© Stack Overflow or respective owner

Related posts about django

Related posts about django-views