constance

Scripts for generating (an earlier obsolete version of) my personal web site
git clone https://code.djc.id.au/git/constance/
commit 357a3835e9d1f2b7179a66a16b6f5fb975309e78
parent 0adaccd05bb6b051176905ca4b8f3c2cab83f06e
Author: Dan Callaghan <djc@djc.id.au>
Date:   Fri,  5 Sep 2008 22:01:22 +1000

mod_wsgi wants the callable to be called application

Diffstat:
Mapp.py | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/app.py b/app.py
@@ -101,12 +101,13 @@ class Constance(RegexApplication):
         else:
             raise PageNotFound('Unknown format %r' % format)
 
+application = Constance
+
 
 if __name__ == '__main__':
     import sys
     import wsgiref.simple_server
-    app = Constance
-    app = StaticExports(app, {'/static': os.path.join(os.path.dirname(__file__), 'static')})
-    server = wsgiref.simple_server.make_server('0.0.0.0', 8082, app)
+    application = StaticExports(application, {'/static': os.path.join(os.path.dirname(__file__), 'static')})
+    server = wsgiref.simple_server.make_server('0.0.0.0', 8082, application)
     server.base_environ['constance.config_filename'] = sys.argv[1]
     server.serve_forever()