Changeset 8508
- Timestamp:
- 10/08/12 15:54:43 (9 years ago)
- Location:
- mauRepo/HPFos/trunk/hpfos/HPFos
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/HPFos/trunk/hpfos/HPFos/manage.py
r8500 r8508 1 1 #!/usr/bin/env python 2 import os 3 import sys 2 from django.core.management import execute_manager 3 import imp 4 try: 5 imp.find_module('settings') # Assumed to be in the same directory. 6 except 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 11 import settings 4 12 5 13 if __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 10 10 PROJECT = os.path.dirname(SRC) 11 11 12 DEBUG = True12 DEBUG = False 13 13 TEMPLATE_DEBUG = DEBUG 14 14 -
mauRepo/HPFos/trunk/hpfos/HPFos/settings_local.py
r8500 r8508 34 34 #MOLES3_DB_CONNECTION = 'postgresql://badc:rotyn217m@neptune.badc.rl.ac.uk:5432/Moles3_dev1' 35 35 #MOLES3_DB_CONNECTION = 'postgresql://badc:yps937g@cidev-db.jc.rl.ac.uk:5432/Moles3' 36 DEBUG = 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 """ 1 import sys 2 import site 16 3 import os 17 4 18 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "HPFos.settings") 5 #this is the path to the virtualenv python site-package dir 6 vepath = 'VEPATH_PAR' 7 #this is the path to dir parent to the django project 8 djangoPath = 'DJANGO_PATH' 19 9 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 11 projectLibPath = 'PROJECT_LIB_PATH' 25 12 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 21 ALLDIRS = [vepath, projectLibPath, djangoPath] 22 23 # Remember original sys.path. 24 prev_sys_path = list(sys.path) 25 26 # Add each new site-packages directory. 27 for directory in ALLDIRS: 28 site.addsitedir(directory) 29 30 # Reorder sys.path so new directories at the front. 31 new_sys_path = [] 32 for item in list(sys.path): 33 if item not in prev_sys_path: 34 new_sys_path.append(item) 35 sys.path.remove(item) 36 sys.path[:0] = new_sys_path 37 38 os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' 39 40 import django.core.handlers.wsgi 41 application = django.core.handlers.wsgi.WSGIHandler() 42
Note: See TracChangeset
for help on using the changeset viewer.