src/cm/wsgi.py
author ymh <ymh.work@gmail.com>
Tue, 04 Mar 2014 13:28:35 +0100
changeset 590 e103299bccc0
parent 586 59cddf254ebd
permissions -rw-r--r--
make django tests working again
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
586
59cddf254ebd fix django-tagging version + correct wsgi.py
ymh <ymh.work@gmail.com>
parents: 585
diff changeset
     6
path = os.environ['PROJECT_PATH']
585
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()