-
Notifications
You must be signed in to change notification settings - Fork 0
/
wsgi.py
35 lines (25 loc) · 930 Bytes
/
wsgi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python3
#
# Copyright 2016 Red Hat, Inc.
#
# Authors:
# Fam Zheng <famz@redhat.com>
#
# This work is licensed under the MIT License. Please see the LICENSE file or
# http://opensource.org/licenses/MIT.
"""
WSGI config for patchew 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.9/howto/deployment/wsgi/
"""
import os
import sys
## GETTING-STARTED: make sure the next line points to your django project dir:
if "OPENSHIFT_REPO_DIR" in os.environ:
sys.path.append(os.path.join(os.environ["OPENSHIFT_REPO_DIR"], "wsgi", "patchew"))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "patchew.settings")
from distutils.sysconfig import get_python_lib
os.environ["PYTHON_EGG_CACHE"] = get_python_lib()
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()