Python Django : No module named security

前端 未结 8 1965
迷失自我
迷失自我 2021-01-01 12:29

When I deploy my project on an Ubuntu Server, using a virtualenv, I got this error :

[17/Sep/2014 22:29:00] \"GET / HTTP/1.1\" 500 59
Traceback (most recent          


        
8条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-01 12:57

    So, I found a solution :

    'django.middleware.security.SecurityMiddleware'
    

    This line is in MIDDLEWARE_CLASSES, from settings.py. When I delete this line I have no more problems with the security module but I guess this is not a good way to solve the problem ... I guess this line is in relation with the crsf token and things like that.

    Any other idea to fix the problem ?

提交回复
热议问题