Python Django : No module named security

前端 未结 8 1901
迷失自我
迷失自我 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 13:09

    If you previously used a virtualenv for this project make sure that you activate it for the next time that you will use this project source bin/activate or check to see that you use the proper version of django.

    If you want to remove some middlewares then you need to make sure of what you are doing.

    0 讨论(0)
  • 2021-01-01 13:12

    I guess this happen in django version 1.7.x when you are trying to open project created using django version higher than 1.7.x

    removing 'django.middleware.security.SecurityMiddleware' helps but it create another problem 'session error' or something

    to fix this:

    pip uninstall django==1.7.x //your current version of django installed
    pip install django==1.9.x //or version that is compatible with the project
    
    0 讨论(0)
提交回复
热议问题