Changeset 8508


Ignore:
Timestamp:
10/08/12 15:54:43 (7 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

Location:
mauRepo/HPFos/trunk/hpfos/HPFos
Files:
1 added
4 edited

Legend:

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

    r8500 r8508  
    11#!/usr/bin/env python 
    2 import os 
    3 import sys 
     2from django.core.management import execute_manager 
     3import imp 
     4try: 
     5    imp.find_module('settings') # Assumed to be in the same directory. 
     6except ImportError: 
     7    import sys 
     8    sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__) 
     9    sys.exit(1) 
     10 
     11import settings 
    412 
    513if __name__ == "__main__": 
    6     os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hpfos.HPFos.settings") 
    7  
    8     from django.core.management import execute_from_command_line 
    9  
    10     execute_from_command_line(sys.argv) 
     14    execute_manager(settings) 
  • mauRepo/HPFos/trunk/hpfos/HPFos/settings.py

    r8500 r8508  
    1010PROJECT = os.path.dirname(SRC) 
    1111 
    12 DEBUG = True 
     12DEBUG = False 
    1313TEMPLATE_DEBUG = DEBUG 
    1414 
  • mauRepo/HPFos/trunk/hpfos/HPFos/settings_local.py

    r8500 r8508  
    3434#MOLES3_DB_CONNECTION = 'postgresql://badc:rotyn217m@neptune.badc.rl.ac.uk:5432/Moles3_dev1' 
    3535#MOLES3_DB_CONNECTION = 'postgresql://badc:yps937g@cidev-db.jc.rl.ac.uk:5432/Moles3' 
     36DEBUG = True 
  • 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.