我需要所有管理模板中的请求对象。在前台模板,我可以用RequestContext
渲染模板实现这一点:Django管理模板:访问模板中的请求对象
return render_to_response('my_template.html',
my_data_dictionary,
context_instance=RequestContext(request)
)
就这样,我可以在前端访问请求对象:
{{ request.path }}
我如何能为所有管理的意见做到这一点在Django 1.2中?
你加''request' TEMPLATE_CONTEXT_PROCESSORS'? – Ahsan