Hi
I am new in apache, linux and python world. I am trying to deploy django application on apache using WSGI (the recommended way).
My django project directory structure is as follows...
- /
- /apache/django.wsgi
- /apps/ #I put all my apps in this directory
- /apps/providers/
- /apps/shopping/
- /apps/...
- /middleware/
- ...
In apache I have following settings....
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias / D:/Projects/project-name/apache/django.wsgi
<Directory "D:/Projects/project-name/apache/">
Allow from all
Order deny,allow
</Directory>
django.wsgi file has got following code...
import os
import sys
import settings
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
os.environ['DJANGO_SETTINGS_MODULE'] = 'project_name.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
On running I found this error in the appache's error.log...
- Error occured on this line. from apps.providers.models import Provider
- Import Error: No module named providers.models
I don't know why it is giving me this error. It should have loaded Provider from apps.providers.models but it is trying to load it from providers.model.
Any solution will be appreciated.
Thanks