ImportError: No module named django.core.wsgi

46 views
Skip to first unread message

Satinderpal Singh

unread,
May 23, 2014, 6:07:48 AM5/23/14
to django-users
ImportError: No module named django.core.wsgi

I am facing the above error while deploying Django with Apache.

Here is my Apacahe conf file contents:

<VirtualHost *:80>
ServerAdmin webmaster@localhost


WSGIPythonPath
/home/user/site:/home/user/.virtualenvs/test/lib/python2.7/site-packages

<Directory /home/user/.virtualenvs/test/lib/python2.7/site-packages>
Options Indexes
Order deny,allow
Allow from all
</Directory>

WSGIPythonHome /home/user/.virtualenvs/test
WSGIScriptAlias /site /home/user/site/site/wsgi.py
<Directory /home/user/site/site>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>

Alias /static/ /home/user/site/static/
<Location "/static/">
Options -Indexes
</Location >
</VirtualHost>


and wsgi.py file

import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "site.settings")

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()


Please help me to resolve the error.

--
Satinderpal Singh
Reply all
Reply to author
Forward
0 new messages