Ignore:
Timestamp:
10/08/12 15:54:43 (8 years ago)
Author:
mnagni
Message:

Incomplete - # 22534: Add versiojn number to the gui page
 http://team.ceda.ac.uk/trac/ceda/ticket/22534
Failed the deployment in cidev.
Fix a configuration problem with DJANGO manage/settings files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/HPFos/trunk/hpfos/HPFos/wsgi.py

    r8348 r8508  
    1 """ 
    2 WSGI config for HPFos project. 
    3  
    4 This module contains the WSGI application used by Django's development server 
    5 and any production WSGI deployments. It should expose a module-level variable 
    6 named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover 
    7 this application via the ``WSGI_APPLICATION`` setting. 
    8  
    9 Usually you will have the standard Django WSGI application here, but it also 
    10 might make sense to replace the whole Django WSGI application with a custom one 
    11 that later delegates to the Django one. For example, you could introduce WSGI 
    12 middleware here, or combine a Django application with an application of another 
    13 framework. 
    14  
    15 """ 
     1import sys 
     2import site 
    163import os 
    174 
    18 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "HPFos.settings") 
     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' 
    199 
    20 # This application object is used by any WSGI server configured to use this 
    21 # file. This includes Django's development server, if the WSGI_APPLICATION 
    22 # setting points here. 
    23 from django.core.wsgi import get_wsgi_application 
    24 application = get_wsgi_application() 
     10#this is the project's name 
     11projectLibPath = 'PROJECT_LIB_PATH' 
    2512 
    26 # Apply WSGI middleware here. 
    27 # from helloworld.wsgi import HelloWorldApplication 
    28 # application = HelloWorldApplication(application) 
     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 TracChangeset for help on using the changeset viewer.