1 | # This file is part of CMT, a Cluster Management Tool made at SARA. |
---|
2 | # Copyright (C) 2012 Sil Westerveld |
---|
3 | # |
---|
4 | # This program is free software; you can redistribute it and/or modify |
---|
5 | # it under the terms of the GNU General Public License as published by |
---|
6 | # the Free Software Foundation; either version 2 of the License, or |
---|
7 | # (at your option) any later version. |
---|
8 | # |
---|
9 | # This program is distributed in the hope that it will be useful, |
---|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | # GNU General Public License for more details. |
---|
13 | # |
---|
14 | # You should have received a copy of the GNU General Public License |
---|
15 | # along with this program; if not, write to the Free Software |
---|
16 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
17 | |
---|
18 | import os, sys |
---|
19 | |
---|
20 | # Append django-libs and directory which holds the sara_cmt project |
---|
21 | sys.path.append('/var/lib/python-support/python%s/django'%sys.version[:3]) |
---|
22 | |
---|
23 | # Append SARA CMT specific paths |
---|
24 | PROJECTPATH = os.path.normpath('/opt/sara_cmt') |
---|
25 | |
---|
26 | sys.path.append(PROJECTPATH) |
---|
27 | sys.path.append(os.path.join(PROJECTPATH,'site-packages')) # should be a symbolic link to (non-global) site-packages |
---|
28 | |
---|
29 | |
---|
30 | os.environ['DJANGO_SETTINGS_MODULE'] = 'sara_cmt.settings' |
---|
31 | |
---|
32 | import django.core.handlers.wsgi |
---|
33 | |
---|
34 | application = django.core.handlers.wsgi.WSGIHandler() |
---|
35 | |
---|