Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Simon Roe
committed
Dec 2, 2010
1 parent
9616ce0
commit c3f1eb5
Showing
11 changed files
with
26 additions
and
788 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,32 +1,41 @@ | |||
import sys | import sys | ||
import site | import site | ||
import os | import os | ||
|
|
||
vepath = '/var/www/stage.farmsubsidy.org/lib/python2.6/site-packages' | |||
|
|
||
# The absolute path to the app | |||
root_path = '/var/www/stage.farmsubsidy.org/' | |||
# python path to the django settings | |||
django_settings_module = 'web.settings' | |||
# Python version | |||
python_version = "2.6" | |||
|
|||
|
|||
|
|||
# Everything below this line should be left alone. | |||
# ================================================ | |||
vepath = root_path + 'lib/python%s/site-packages' % python_version | |||
prev_sys_path = list(sys.path) | prev_sys_path = list(sys.path) | ||
# add the site-packages of our virtualenv as a site dir |
|
||
# add the site-packages of our virtualenv as a site dir | |||
site.addsitedir(vepath) | site.addsitedir(vepath) | ||
|
|||
# add the app's directory to the PYTHONPATH | # add the app's directory to the PYTHONPATH | ||
sys.path.append('/var/www/stage.farmsubsidy.org/') | sys.path.append(root_path) | ||
sys.path.append('/var/www/stage.farmsubsidy.org/web/') | sys.path.append(root_path + 'web') | ||
|
|
||
# reorder sys.path so new directories from the addsitedir show up first | # 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] | new_sys_path = [p for p in sys.path if p not in prev_sys_path] | ||
# for item in new_sys_path: | for item in new_sys_path: | ||
# sys.path.remove(item) | sys.path.remove(item) | ||
# sys.path[:0] = new_sys_path | sys.path[:0] = new_sys_path | ||
|
|
||
sys.stdout = sys.stderr | sys.stdout = sys.stderr | ||
print >> sys.stderr, sys.path | |||
|
|
||
|
|
||
# import from down here to pull in possible virtualenv django install | # import from down here to pull in possible virtualenv django install | ||
from django.core.handlers.wsgi import WSGIHandler | from django.core.handlers.wsgi import WSGIHandler | ||
from web import settings | os.environ['DJANGO_SETTINGS_MODULE'] = django_settings_module | ||
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' | |||
# print dir(settings) | |||
# print settings.DATABASE_PORT | |||
os.environ['PYTHON_EGG_CACHE'] = '/var/www/stage.farmsubsidy.org/eggs' | |||
|
|||
|
|||
application = WSGIHandler() | application = WSGIHandler() | ||
|
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.