aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2014-09-30 07:57:22 +0200
committerWojciech Polak <polak@gnu.org>2014-09-30 07:57:22 +0200
commite8ac34a16b931615addab47db803cc237d4c6e3b (patch)
treea884af72aa0a80c95cc0a8b8c8c2614f5437123b
parent6cf3b8ca136d9aff6c2e10003d550457da1a5c54 (diff)
downloaddico-e8ac34a16b931615addab47db803cc237d4c6e3b.tar.gz
dico-e8ac34a16b931615addab47db803cc237d4c6e3b.tar.bz2
Add wsgi.virtualenv.py
-rw-r--r--.gitignore1
-rw-r--r--dicoweb/wsgi.virtualenv.py29
2 files changed, 30 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index a37701e..f6c6d67 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,6 +34,7 @@ dicoweb/bin
dicoweb/include
dicoweb/lib
dicoweb/lib64
+dicoweb/settings.py
gmon.out
gnu
gnulib
diff --git a/dicoweb/wsgi.virtualenv.py b/dicoweb/wsgi.virtualenv.py
new file mode 100644
index 0000000..e19dea9
--- /dev/null
+++ b/dicoweb/wsgi.virtualenv.py
@@ -0,0 +1,29 @@
+# This file is part of GNU Dico.
+# Copyright (C) 2008-2009, 2012-2014 Wojciech Polak
+#
+# GNU Dico is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Dico is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Dico. If not, see <http://www.gnu.org/licenses/>.
+
+import os
+import sys
+
+SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
+os.environ['DJANGO_SETTINGS_MODULE'] = 'dicoweb.settings'
+
+activate_this = os.path.join(SITE_ROOT, 'bin/activate_this.py')
+execfile(activate_this, dict(__file__=activate_this))
+
+sys.path.insert(0, os.path.join(SITE_ROOT, '../'))
+
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()

Return to:

Send suggestions and report system problems to the System administrator.