equal
deleted
inserted
replaced
3 def application(environ, start_response): |
3 def application(environ, start_response): |
4 |
4 |
5 global g_env_set |
5 global g_env_set |
6 |
6 |
7 if 'g_env_set' not in globals() or not g_env_set: |
7 if 'g_env_set' not in globals() or not g_env_set: |
8 os.environ['DJANGO_SETTINGS_MODULE'] = environ['DJANGO_SETTINGS_MODULE'] |
8 os.environ.setdefault('DJANGO_SETTINGS_MODULE',environ['DJANGO_SETTINGS_MODULE']) |
9 |
9 |
10 prev_sys_path = list(sys.path) |
10 prev_sys_path = list(sys.path) |
11 |
11 |
12 sys.path.append(environ['PROJECT_PATH']) |
12 sys.path.append(environ['PROJECT_PATH']) |
13 for path in environ.get('PYTHON_PATH',"").split(os.pathsep): |
13 for path in environ.get('PYTHON_PATH',"").split(os.pathsep): |
28 |
28 |
29 if environ.get('PYDEV_DEBUG', "False").lower() in ["true", "1", "t"]: |
29 if environ.get('PYDEV_DEBUG', "False").lower() in ["true", "1", "t"]: |
30 import pydevd #@UnresolvedImport |
30 import pydevd #@UnresolvedImport |
31 pydevd.settrace(suspend=False) |
31 pydevd.settrace(suspend=False) |
32 |
32 |
33 |
|
34 return _application(environ, start_response) |
33 return _application(environ, start_response) |
35 |
34 |