Gitlab CSE Unil

wsgi.example.py 658 Bytes
Newer Older
Julien Furrer's avatar
Julien Furrer committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
WSGI config for adim_project project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""

import os
virtualenv_path = '<absolute pathe to virtual env>'
this_file = os.path.join(virtualenv_path, 'bin', 'activate_this.py')
execfile(this_file, dict(__file__=this_file))

BASE_DIR = os.path.dirname(os.path.dirname(__file__))
import sys
sys.path.append(BASE_DIR)

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "adim_project.settings")

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()