Zat42 Zat42 - 1 year ago 183
Python Question

Python Django : No module named security

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 call last):
File "/usr/lib/python2.7/wsgiref/", line 85, in run
self.result = application(self.environ, self.start_response)
File "/home/zat42/myproject/monarch/env/local/lib/python2.7/site-packages/django/contrib/staticfiles/", line 64, in __call__
return self.application(environ, start_response)
File "/home/zat42/myproject/monarch/env/local/lib/python2.7/site-packages/django/core/handlers/", line 168, in __call__
File "/home/zat42/myproject/monarch/env/local/lib/python2.7/site-packages/django/core/handlers/", line 44, in load_middleware
mw_class = import_string(middleware_path)
File "/home/zat42/myproject/monarch/env/local/lib/python2.7/site-packages/django/utils/", line 26, in import_string
module = import_module(module_path)
File "/usr/lib/python2.7/importlib/", line 37, in import_module
ImportError: No module named security

I don't know why there is this error my configuration works fine with a fresh install... But when I copy my current project, I got Error 500. I tried to deploy "part after part" but I can't find what's wrong.

Tell me if you need more of my files because I don't really know where is the problem...

Thank you.

Answer Source

I met the same problem. Finnaly, I found I’m using django 1.7.1 to run a 1.8dev generated project. When I switch back to 1.7.1, and remove ‘’ in, it seems ok.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download