django中render_to_response函数的参数问题

def some_view(request):
    return render_to_response('my_template.html', my_data_dictionary, context_instance=RequestContext(request))

请问有高人知道最后一个参数 context_instance=RequestContext(request) 的具体意义和用法吗 看别人的代码经常看到 但是不知道这个的具体用处 求解答

阅读 11.5k
2 个回答
新手上路,请多包涵

官方文档:

context_instance
The context instance to render the template with. By default, the template will be rendered with a RequestContext instance (filled with values from request and dictionary).

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题