示例#1
0
def create_app():

    app = Flask(__name__, template_folder='')
    dist_folder = os.path.abspath(os.path.join(app.root_path, "../static"))
    app.static_folder = dist_folder
    app.static_url_path = '/static'
    app_path = app.root_path
    app.url_map.strict_slashes = False
    app.config.from_object(ConfigHelper.set_config(sys.argv))
    register_blueprints(app)
    init_global_functions(app)
    register_extensions(app)
    register_components(app)
    return app
示例#2
0
def create_app():
    
    app = Flask(__name__) 
    redefine_delimiters(app)
    dist_folder = os.path.abspath(os.path.join(app.root_path,"../static"))
    app.static_folder = dist_folder
    app.static_url_path='/static'
    app.url_map.strict_slashes = False
    app.config.from_object(ConfigHelper.set_config(sys.argv))
    initialize_libraries(app)
    init_filters(app)
    init_global_functions(app)
    register_blueprints(app)
    register_error_handlers(app)
    return app