comparison bns_website/apache/bns.wsgi @ 27:a5e8741452a3

Add path to Django in WSGI file. Use Django's simplesjon module as it will either import the Python system one if it exists, or use the one provided with Django as a fallback. This is needed for the production server, which is running Python 2.5.
author Brian Neal <bgneal@gmail.com>
date Tue, 01 Nov 2011 20:15:21 -0500
parents 6f68f6800843
children f00199f1524c
comparison
equal deleted inserted replaced
26:6f68f6800843 27:a5e8741452a3
6 here = os.path.dirname(__file__) 6 here = os.path.dirname(__file__)
7 website = os.path.dirname(here) 7 website = os.path.dirname(here)
8 repo = os.path.dirname(website) 8 repo = os.path.dirname(website)
9 project = os.path.dirname(repo) 9 project = os.path.dirname(repo)
10 eggs = os.path.join(project, 'eggs') 10 eggs = os.path.join(project, 'eggs')
11 django = os.path.join(project, 'django')
11 12
12 sys.path.extend([repo, website]) 13 sys.path.extend([repo, website, django])
13 14
14 os.environ['PYTHON_EGG_CACHE'] = eggs 15 os.environ['PYTHON_EGG_CACHE'] = eggs
15 16
16 17
17 def offline_handler(environ, start_response): 18 def offline_handler(environ, start_response):