Changes

Jump to: navigation, search

AMO/FlightDeck/1.0a6/ServerUpdate

1,127 bytes added, 00:23, 19 November 2010
Clean Up
If there is any other file or directory it is adviced to remove it.
 
= WSGI Config =
 
This is a WSGI script I run under Apache2 on http://flightdeck.zalewa.info/
 
import sys
import os
import site
PROJECT_PATH = '/var/www/FlightDeck'
VIRTUAL_ENV = '/home/zalun/Envs/flightdeck'
ALLDIRS = [
os.path.join(PROJECT_PATH),
os.path.join(PROJECT_PATH, 'apps'),
os.path.join(VIRTUAL_ENV, 'lib/python2.6/site-packages'),
]
# Remember original sys.path.
prev_sys_path = list(sys.path)
# Add each new site-packages directory.
for directory in ALLDIRS:
site.addsitedir(directory)
# add the app's directory to the PYTHONPATH
apache_configuration= os.path.dirname(__file__)
project = os.path.dirname(apache_configuration)
workspace = os.path.dirname(project)
sys.path.append(workspace)
# reorder sys.path so new directories from the addsitedir show up first
new_sys_path = [p for p in sys.path if p not in prev_sys_path]
for item in new_sys_path:
sys.path.remove(item)
sys.path[:0] = new_sys_path
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings_local'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
Confirm
514
edits

Navigation menu