summaryrefslogtreecommitdiffstats
path: root/index.py
diff options
context:
space:
mode:
Diffstat (limited to 'index.py')
-rwxr-xr-xindex.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/index.py b/index.py
index 27a5cf3..26351bb 100755
--- a/index.py
+++ b/index.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
-from web import template, form, application, ctx
from socket import gethostbyaddr
+from web import template, form, application, ctx, wsgi
urls = (
r'/', 'index',
@@ -12,6 +12,8 @@ urls = (
)
render = template.render('templates/', base='layout');
+app = application(urls, globals(), autoreload=False)
+
create_form = form.Form(
form.Textbox('name',
@@ -54,5 +56,7 @@ class new:
if __name__ == "__main__":
- app = application(urls, globals(), autoreload=False)
+ if ('--fastcgi' in sys.argv):
+ wsgi.runwsgi = lambda func, addr=None: wsgi.runfcgi(func, addr)
+
app.run()