django request in template

前端 未结 5 2047
闹比i
闹比i 2020-12-06 15:56

I\'ve enabled the django request processor

TEMPLATE_PROCESSORS = (
\"django.core.context_processors.auth\",
\"django.core.context_processors.debug\",
\"djang         


        
5条回答
  •  执笔经年
    2020-12-06 16:32

    Are you sure you don't have the request variable available to the template? What happens when you remove the line

    'request':request,
    

    that's different from when that line is present. If your template loads the same either way, the problem is with your template.

提交回复
热议问题