Mercurial > public > sg101
comparison gpp/apache/sg101.wsgi @ 511:5794e3414596
Converted production environment to a virtualenv; had to tweak some paths and the .wsgi file accordingly.
I also added packages in preparation for working with Celery, so I updated the requirements file according to production.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 11 Dec 2011 19:50:32 +0000 |
parents | 1a09a7bea000 |
children |
comparison
equal
deleted
inserted
replaced
510:e6298cde9cc9 | 511:5794e3414596 |
---|---|
1 import os | 1 import os |
2 import sys | 2 import sys |
3 import site | |
4 | |
3 | 5 |
4 OFFLINE = False | 6 OFFLINE = False |
5 | 7 |
6 sys.path.append('/home/var/django-sites/sg101') | 8 site.addsitedir('/home/var/django-sites/virtualenvs/sg101/lib/python2.5/site-packages') |
7 sys.path.append('/home/var/django-sites/sg101/3rdparty') | |
8 sys.path.append('/home/var/django-sites/sg101/sg101-trunk') | |
9 sys.path.append('/home/var/django-sites/sg101/sg101-trunk/gpp') | |
10 | 9 |
11 os.environ['PYTHON_EGG_CACHE'] = '/home/var/django-sites/sg101/eggs/' | 10 sys.path.append('/home/var/django-sites/virtualenvs/sg101/sg101') |
11 sys.path.append('/home/var/django-sites/virtualenvs/sg101/sg101/gpp') | |
12 sys.path.append('/home/var/django-sites/virtualenvs/sg101/sg101/tools') | |
13 | |
14 os.environ['PYTHON_EGG_CACHE'] = '/home/var/django-sites/virtualenvs/sg101/eggs' | |
15 os.environ['CELERY_LOADER'] = 'django' | |
12 | 16 |
13 | 17 |
14 def offline_handler(environ, start_response): | 18 def offline_handler(environ, start_response): |
15 wsgi_dir = os.path.dirname(__file__) | 19 wsgi_dir = os.path.dirname(__file__) |
16 sys.path.append(wsgi_dir) | 20 sys.path.append(wsgi_dir) |