source: mauRepo/MolesManager/trunk/resources/wsgi.py @ 8057

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/resources/wsgi.py@8057
Revision 8057, 634 bytes checked in by mnagni, 8 years ago (diff)

relocated the wsgi.py
updated the configuration
added a dependency (existing but missing from the requirements.txt) from psycop2

Line 
1import sys
2import site
3import os
4
5#this is the path to the virtualenv python site-package dir
6vepath = 'VEPATH_PAR'
7#this is the path to dir parent to the django project
8projectPath = 'PATH_TO_DJANGO_PROJECT'
9
10#this is the project's name
11projectName = 'PROJECT_NAME_PAR'
12
13
14# add the site-packages of our virtualenv as a site dir
15site.addsitedir(vepath)
16
17# add the app's directory to the PYTHONPATH
18sys.path.append(projectPath)
19sys.path.append(projectPath + '/' + projectName)
20
21os.environ['DJANGO_SETTINGS_MODULE'] = 'PROJECT_NAME_PAR.settings'
22
23import django.core.handlers.wsgi
24application = django.core.handlers.wsgi.WSGIHandler()
25
Note: See TracBrowser for help on using the repository browser.