def run(self, bare=False): """Runs the app using ``google.appengine.ext.webapp.util.run_wsgi_app``. This is generally called inside a ``main()`` function of the file mapped in *app.yaml* to run the application:: # ... app = WSGIApplication([ Route(r'/', HelloWorldHandler), ]) def main(): app.run() if __name__ == '__main__': main() :param bare: If True, uses ``run_bare_wsgi_app`` instead of ``run_wsgi_app``, which doesn't add WSGI middleware. """ # Fix issue #772. if self.debug: fix_sys_path() if bare: run_bare_wsgi_app(self) else: run_wsgi_app(self)
def run(self, bare=False): """Runs the app using ``google.appengine.ext.webapp.util.run_wsgi_app``. This is generally called inside a ``main()`` function of the file mapped in *app.yaml* to run the application:: import webapp2 app = webapp2.WSGIApplication([ webapp2.Route(r'/', 'handlers.HelloWorldHandler'), ]) def main(): app.run() if __name__ == '__main__': main() :param bare: If True, uses ``run_bare_wsgi_app`` instead of ``run_wsgi_app``, which doesn't add WSGI middleware. """ if bare: util.run_bare_wsgi_app(self) else: util.run_wsgi_app(self)
def run(self, bare=False): """Runs the app using ``google.appengine.ext.webapp.util.run_wsgi_app``. This is generally called inside a ``main()`` function of the file mapped in *app.yaml* to run the application:: # ... app = WSGIApplication([ Route(r'/', HelloWorldHandler), ]) def main(): app.run() if __name__ == '__main__': main() :param bare: If True, uses ``run_bare_wsgi_app`` instead of ``run_wsgi_app``, which doesn't add WSGI middleware. """ if bare: run_bare_wsgi_app(self) else: run_wsgi_app(self)
def main(): """Called by App Engine for incoming requests. Since this handler script defines a function named main(), then the script and its global environment will be cached like an imported module. The first request for the script on a given web server evaluates the script normally. For subsequent requests, App Engine calls the main() function in the cached environment. """ # Use GAE helper function to run the WSGI app. run_bare_wsgi_app(wsgi_app)
def main(): """The main function.""" app = webapp.WSGIApplication([ ('.*/static/.*', StaticHandler), ('.*/records.*', AJAXRecordsHandler), ('.*/browse.*', BrowserHandler), ('.*', OverviewHandler), ], debug=True) util.run_bare_wsgi_app(app)
def main(): """The main function.""" app = webapp.WSGIApplication([ ('.*/static/.*', StaticHandler), ('.*/records.*', AJAXRecordsHandler), ('.*/browse.*', BrowserHandler), ('.*', OverviewHandler), ], debug=True) util.run_bare_wsgi_app(app)
def main(): """Main program. Auth check, then create and run the WSGIApplication.""" if not os.getenv('SERVER_SOFTWARE', '').startswith('Dev'): if not users.is_current_user_admin(): if users.get_current_user() is None: print 'Status: 302' print 'Location:', users.create_login_url(os.getenv('PATH_INFO', '')) else: print 'Status: 403' print print 'Forbidden' return app = webapp.WSGIApplication(URLMAP, debug=DEBUG) util.run_bare_wsgi_app(app)
def main(): """Main program. Run the auth checking middleware wrapped WSGIApplication.""" util.run_bare_wsgi_app(app)
def main(): """Main program. Run the auth checking middleware wrapped WSGIApplication.""" util.run_bare_wsgi_app(app)
def main(): util.run_bare_wsgi_app(application)
def main(): util.run_bare_wsgi_app(app)
def main(): util.run_bare_wsgi_app(app)
def main(): run_bare_wsgi_app(wsgi_app)
def main(): run_bare_wsgi_app(wsgi_app)
def main(): util.run_bare_wsgi_app(application)
def run_appengine(self, bare=False): run_bare_wsgi_app(self)