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

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/resources/wsgi.py@8491
Revision 8491, 1.2 KB checked in by mnagni, 7 years ago (diff)

Incomplete - # 22534: Add versiojn number to the gui page
 http://team.ceda.ac.uk/trac/ceda/ticket/22534
trying to get rid of tab/space issue

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
8djangoPath = 'DJANGO_PATH'
9
10#this is the project's name
11projectLibPath = 'PROJECT_LIB_PATH'
12
13#EXAMPLE
14#vepath = '/home/jenkins/testEnv/pyEnv/ve/cedaManager/lib/python2.6/site-packages'
15#djangoPath = '/home/jenkins/testEnv/pyEnv/ve/cedaManager/lib/python2.6/site-packages/cedaManager/src/MolesManager'
16#projectLib = '/home/jenkins/testEnv/pyEnv/ve/cedaManager/lib/python2.6/site-packages/cedaManager/src'
17
18#this is the project's name
19#projectName = ''
20
21ALLDIRS = [vepath, projectLibPath, djangoPath]
22
23# Remember original sys.path.
24prev_sys_path = list(sys.path)
25
26# Add each new site-packages directory.
27for directory in ALLDIRS:
28    site.addsitedir(directory)
29
30# Reorder sys.path so new directories at the front.
31new_sys_path = []
32for item in list(sys.path):
33    if item not in prev_sys_path:
34        new_sys_path.append(item)
35        sys.path.remove(item)
36sys.path[:0] = new_sys_path
37
38os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
39
40import django.core.handlers.wsgi
41application = django.core.handlers.wsgi.WSGIHandler()
42
Note: See TracBrowser for help on using the repository browser.