Commits

Thomas Waldmann  committed 52dd2c4 Draft

add app.on_gae boolean, so code can check whether it runs on Google App Engine

  • Participants
  • Parent commits 5c1a0f5
  • Branches gae

Comments (0)

Files changed (2)

File MoinMoin/app.py

     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)
     # 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__':