Changeset 8066 for mauRepo/MolesManager


Ignore:
Timestamp:
19/01/12 09:20:11 (8 years ago)
Author:
mnagni
Message:

corrected structure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/resources/wsgi.py

    r8063 r8066  
    66vepath = 'VEPATH_PAR' 
    77#this is the path to dir parent to the django project  
    8 projectPath = 'PATH_TO_DJANGO_PROJECT' 
     8djangoPath = 'DJANGO_PATH' 
    99 
    1010#this is the project's name 
    11 projectName = 'PROJECT_NAME_PAR' 
     11projectLibPath = 'PROJECT_LIB_PATH' 
    1212 
     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' 
    1317 
    14 # add the site-packages of our virtualenv as a site dir 
    15 site.addsitedir(vepath) 
     18#this is the project's name 
     19#projectName = '' 
    1620 
    17 # add the app's directory to the PYTHONPATH 
    18 sys.path.append(projectPath) 
    19 sys.path.append(projectPath + '/' + projectName) 
     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 
    2037 
    2138os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' 
Note: See TracChangeset for help on using the changeset viewer.