src/cm/wsgi.py
author ymh <ymh.work@gmail.com>
Tue, 18 Feb 2014 17:31:35 +0000
changeset 585 9e403b05797b
child 586 59cddf254ebd
permissions -rw-r--r--
refine buildout config and add buildout config for wsgi server
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
585
9e403b05797b refine buildout config and add buildout config for wsgi server
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import os
9e403b05797b refine buildout config and add buildout config for wsgi server
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
import sys
9e403b05797b refine buildout config and add buildout config for wsgi server
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
9e403b05797b refine buildout config and add buildout config for wsgi server
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
os.environ['DJANGO_SETTINGS_MODULE'] = 'cm.settings'
9e403b05797b refine buildout config and add buildout config for wsgi server
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
9e403b05797b refine buildout config and add buildout config for wsgi server
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
path = environ['PROJECT_PATH']
9e403b05797b refine buildout config and add buildout config for wsgi server
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
if path not in sys.path:
9e403b05797b refine buildout config and add buildout config for wsgi server
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
    sys.path.append(path)
9e403b05797b refine buildout config and add buildout config for wsgi server
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
9e403b05797b refine buildout config and add buildout config for wsgi server
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
import django.core.handlers.wsgi
9e403b05797b refine buildout config and add buildout config for wsgi server
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
app = django.core.handlers.wsgi.WSGIHandler()