changeset 1811:52dd2c449e07 gae

add app.on_gae boolean, so code can check whether it runs on Google App Engine
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 29 Sep 2012 23:33:22 +0200
parents 5c1a0f5c35e3
children 43d726533fad
files MoinMoin/app.py moin.py
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/app.py	Sat Sep 29 22:24:37 2012 +0200
+++ b/MoinMoin/app.py	Sat Sep 29 23:33:22 2012 +0200
@@ -68,6 +68,7 @@
     clock = Clock()
     clock.start('create_app total')
     app = Flask('MoinMoin')
+    app.on_gae = False
     clock.start('create_app load config')
     if flask_config_file:
         app.config.from_pyfile(flask_config_file)
--- a/moin.py	Sat Sep 29 22:24:37 2012 +0200
+++ b/moin.py	Sat Sep 29 23:33:22 2012 +0200
@@ -24,6 +24,7 @@
     # Create the WSGI application object.
     from MoinMoin.app import create_app
     application = create_app(create_index=create_index)
+    application.on_gae = True  # GAE specific code can check this
 
 
 elif __name__ == '__main__':