def create_app(): # See http://flask.pocoo.org/docs/patterns/appfactories app = flask.Flask(__name__) nav.nav.init_app(app) flask_dotenv.DotEnv().init_app(app, verbose_mode = True) flask_bootstrap.Bootstrap(app) app.register_blueprint(frontend) app.config['BOOTSTRAP_SERVE_LOCAL'] = True app.config['TEMPLATES_AUTO_RELOAD'] = True return app
def create_app(dev_mode=True): # See http://flask.pocoo.org/docs/patterns/appfactories app = flask.Flask(__name__) nav.nav.init_app(app) flask_dotenv.DotEnv().init_app(app, verbose_mode=dev_mode) flask_bootstrap.Bootstrap(app) app.register_blueprint(frontend) app.config['BOOTSTRAP_SERVE_LOCAL'] = True app.config['TEMPLATES_AUTO_RELOAD'] = dev_mode import crypto app.config['PREREGISTRATION_CODE'] = crypto.hmac('preregistration') return app
def setUp(self): self.app = flask.Flask(__name__) self.env = dotenv.DotEnv()
def init_app(app): env = dotenv.DotEnv() env.init_app(app)