def create_app(settings_override=None): """Return the NYC Python frontend application. :param settings_override: a ``dict`` of settings to override. """ app = factory.create_app(__name__, __path__, settings_override) if not app.debug: for e in (404, 500): app.errorhandler(e)(handle_error) return _easteregg(app)
def create_app(settings_override=None): """Return the NYC Python frontend application. :param settings_override: a ``dict`` of settings to override. """ app = factory.create_app(__name__, __path__, settings_override) if not app.debug: for e in (404, 500): app.errorhandler(e)(handle_error) return app
"""Management commands.""" from flask.ext.script import Manager from nycpython.factory import create_app manager = Manager(create_app(__name__, '')) if __name__ == '__main__': manager.run()