diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-17 18:02:33 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-17 18:02:33 -0400 |
commit | 198f25b93c7b9ce4cad693a9654872a7fa80dca6 (patch) | |
tree | 15bc64153c76037a595844b26f80f29dbb125601 /archweb.wsgi | |
parent | 59e4850d2a0427b3598a66d612b1812a37d2e002 (diff) | |
parent | 442a2b1a9cf8e3ca0c22b3d52397e7d9b5a6fecc (diff) |
Merge branch 'archweb-generic'
# Conflicts:
# templates/public/index.html
Diffstat (limited to 'archweb.wsgi')
-rw-r--r-- | archweb.wsgi | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/archweb.wsgi b/archweb.wsgi index a0d969e7..20ec463e 100644 --- a/archweb.wsgi +++ b/archweb.wsgi @@ -3,10 +3,12 @@ import os import sys import site -base_path = "/srv/http/archweb" +base_path = os.path.dirname(os.path.realpath(__file__)) -site.addsitedir('/srv/http/archweb-env/lib/python2.7/site-packages') -sys.path.insert(0, base_path) +virtualenv_path = os.path.join(base_path, "env") +if os.path.isdir(virtualenv_path): + site.addsitedir(os.path.join(virtualenv_path, 'lib/python2.7/site-packages')) + sys.path.insert(0, base_path) os.environ['DJANGO_SETTINGS_MODULE'] = "settings" |