python - Unable to access dependent modules in Django project deployed in Apache server -
i moved django project apache server. facing few issues respect dependency modules being inaccessible after moving project apache.
here configuration files:
this bemoss.conf file in sites-available directory of apache:
wsgipythonpath /home/kruthika/workspace/bemoss_web_ui wsgipythonpath /home/kruthika/workspace/rtunetwork/volttron wsgipythonpath /home/kruthika/workspace/bemoss_web_ui/helper <virtualhost *:80> wsgiscriptalias / /home/kruthika/workspace/bemoss_web_ui/bemoss.wsgi servername bemoss.com alias /static /home/kruthika/workspace/bemoss_web_ui/static <directory /home/kruthika/workspace/bemoss_web_ui/> order allow,deny allow </directory> </virtualhost>
here bemoss.wsgi file:
import os import sys sys.path = ['/home/kruthika/workspace']+sys.path print sys.path os.environ['django_settings_module']='bemoss_web_ui.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.wsgihandler()
my project accessing few more python files project. added reference in .conf file above , in settings.py file given below.
project_dir = os.path.dirname(__file__) print project_dir sys.path.insert(3,os.path.join(project_dir,'zmqhelper')) sys.path.insert(1,os.path.join(project_dir,'helper')) sys.path.insert(2, '/home/kruthika/workspace/rtunetwork/volttron') print sys.path
this project folder definition:
when try access link, views.py file refers above mentioned dependencies, throws import module error given below.
my question here how refer dependent modules/python classes files imported properly.
all these imports working fine when executed project on django's development server. there apache configuration missing or doing wrong? new server configurations , think missing here.
Comments
Post a Comment