-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwsgi.py
More file actions
27 lines (21 loc) · 815 Bytes
/
wsgi.py
File metadata and controls
27 lines (21 loc) · 815 Bytes
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
#coding: utf-8
"""
WSGI config for comm comm.
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.8/howto/deployment/wsgi/
"""
import os
import sys
import shutil
import celery.app
celery_app = celery.app.app_or_default()
reload(sys)
sys.setdefaultencoding('utf8')
from django.core.wsgi import get_wsgi_application
# setting_root = os.path.join(os.path.dirname(__file__),'root')
# print setting_root,'----------------------------'
# os.environ.setdefault("DJANGO_SETTINGS_MODULE", "root.settings_test")
# shutil.copy(os.path.join(setting_root,'settings_test.py'), os.path.join(setting_root,'settings.py'))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "perf.settings")
application = get_wsgi_application()