def create_app(database): global app # create our little application :) app = Flask(__name__) app.config.from_object(config) app.secret_key = config.SECRET_KEY # db import from libs.db import init_connection # db setup init_connection(database) # presenters from presenters.home import home # register modules app.register_blueprint(home) # template filters @app.template_filter('test_format') def test_format(input): return input[::-1] return app
def create_app(database): global app # create our little application :) app = Flask(__name__) app.config.from_object(config) app.secret_key = config.SECRET_KEY # db import from libs.db import init_connection # db setup if database: init_connection(database) # presenters from presenters.home import home # register modules app.register_blueprint(home) # template filters @app.template_filter('test_format') def test_format(input): return input[::-1] return app
def create_app(database): global app # create our little application :) app = Flask(__name__) app.debug = True app.config.from_object(__name__) app.secret_key = '^]CUCqFL6;wVz-w4%#ZYKTIB]kWT+3rfAq@_}(p;r%Mjq6umt9\>8-.){.u!uA*' # db import from libs.db import init_connection # db setup init_connection(database) # presenters from presenters.listing import listing from presenters.doc import doc # register modules app.register_module(listing) app.register_module(doc) # template filters @app.template_filter('test_format') def test_format(input): return input[::-1] return app