forked from autotest/autotest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend: Replaces mod_python by mod_wsgi apache module
This patch also repairs bug with readonly_connection to mysql database. Signed-off-by: Jiří Župka <[email protected]>
- Loading branch information
Showing
3 changed files
with
47 additions
and
11 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
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
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import os, sys | ||
|
||
path_list = ['/usr/local/autotest/site-packages', '/usr/local/autotest', | ||
'/usr/lib/python2.7/site-packages/autotest', | ||
'/usr/lib/python2.6/site-packages/autotest', | ||
'/usr/lib/python2.5/site-packages/autotest', | ||
'/usr/lib/python2.4/site-packages/autotest'] | ||
|
||
for p in path_list: | ||
if os.path.isdir(p): | ||
sys.path.append(p) | ||
|
||
os.environ['DJANGO_SETTINGS_MODULE'] = 'frontend.settings' | ||
|
||
import django.core.handlers.wsgi | ||
|
||
_application = django.core.handlers.wsgi.WSGIHandler() | ||
|
||
def application(environ, start_response): | ||
environ['DJANGO_USE_POST_REWRITE'] = "yes" | ||
environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO'] | ||
return _application(environ, start_response) |