aboutsummaryrefslogtreecommitdiff
path: root/dicoweb/wsgi.py
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2013-04-09 19:59:50 +0200
committerWojciech Polak <polak@gnu.org>2013-04-09 20:01:47 +0200
commit11de8715829bd3744de9542dd77a6d658ba519d8 (patch)
treeb8afe4a8e29d2fbfbce2b53b0cde319aafbe5ad2 /dicoweb/wsgi.py
parent8f61a0bf3cd35445dc5cb5c18faf69d3a1d32680 (diff)
downloaddico-11de8715829bd3744de9542dd77a6d658ba519d8.tar.gz
dico-11de8715829bd3744de9542dd77a6d658ba519d8.tar.bz2
Support Django 1.5.
Diffstat (limited to 'dicoweb/wsgi.py')
-rw-r--r--dicoweb/wsgi.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/dicoweb/wsgi.py b/dicoweb/wsgi.py
new file mode 100644
index 0000000..d3bee86
--- /dev/null
+++ b/dicoweb/wsgi.py
@@ -0,0 +1,25 @@
+# This file is part of GNU Dico.
+# Copyright (C) 2008-2009, 2012, 2013 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'
+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.