diff options
Diffstat (limited to 'index.py')
-rwxr-xr-x | index.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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() |