blob: 582b28f049f33dc1b37b7a250f2015a5cbda9ed4 [file] [log] [blame]
<IfModule !prefork.c>
# Django requires the prefork MPM, so just fail with this bogus directive
# if it's not loaded. See
# http://test.kernel.org/autotest/AutotestServerInstall for more info.
ERROR__DJANGO_REQUIRES_THE_PREFORK_MPM
</IfModule>
#
# Try to serve admin media files, no matter where django is actually installed
# Covers python versions 2.4 through 2.7 and also django installed by utils/build_externals.py
#
RewriteEngine On
RewriteCond /usr/local/autotest/site-packages/django/contrib/admin/media -d
RewriteRule /media(.*) /usr/local/autotest/site-packages/django/contrib/admin/media$1
RewriteCond /usr/lib/python2.4/site-packages/django/contrib/admin/media -d
RewriteRule /media(.*) /usr/lib/python2.4/site-packages/django/contrib/admin/media$1
RewriteCond /usr/lib/python2.5/site-packages/django/contrib/admin/media -d
RewriteRule /media(.*) /usr/lib/python2.5/site-packages/django/contrib/admin/media$1
RewriteCond /usr/lib/python2.6/site-packages/django/contrib/admin/media -d
RewriteRule /media(.*) /usr/lib/python2.6/site-packages/django/contrib/admin/media$1
RewriteCond /usr/lib/python2.7/site-packages/django/contrib/admin/media -d
RewriteRule /media(.*) /usr/lib/python2.7/site-packages/django/contrib/admin/media$1
<Location ~ "/(afe|new_tko|croschart)/server">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE frontend.settings
PythonDebug On
# Force our own site-packages to be loaded by mod_python prior
# to mod_python's system python site-packages directory.
# This way our code can depend on library versions other than
# those available as packages on various OS distributions.
PythonPath "['/usr/local/autotest/site-packages', '/usr/local/autotest'] + sys.path"
</Location>