summaryrefslogtreecommitdiffstats
path: root/wsgi.py
diff options
context:
space:
mode:
authorraylu <raylu@cmu.edu>2011-05-12 05:55:19 -0400
committerraylu <raylu@cmu.edu>2011-05-12 05:55:19 -0400
commitc0f4c6c25960c7e9c94e89962b841509fe66a5d8 (patch)
tree426eb2e020d52f189db289eec0bb173af2c6d30d /wsgi.py
downloadpyc-c0f4c6c25960c7e9c94e89962b841509fe66a5d8.tar.xz
Blank Django project and dotcloud setup
http://docs.dotcloud.com/tutorials/django/
Diffstat (limited to 'wsgi.py')
-rw-r--r--wsgi.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/wsgi.py b/wsgi.py
new file mode 100644
index 0000000..0d1f07b
--- /dev/null
+++ b/wsgi.py
@@ -0,0 +1,11 @@
+import os, sys
+
+os.environ['DJANGO_SETTINGS_MODULE'] = 'pyc.settings'
+
+import django.core.handlers.wsgi
+djangoapplication = django.core.handlers.wsgi.WSGIHandler()
+
+def application(environ, start_response):
+ if 'SCRIPT_NAME' in environ:
+ del environ['SCRIPT_NAME']
+ return djangoapplication(environ, start_response)