Exemplo n.º 1
0
def create_app_base(test=False, ext_list=None, **settings):
    """Creates basic app only with extensions provided in ext_list
    useful for testing."""

    app = QuokkaApp('quokka')
    if settings:
        app.config.update(settings)
    configure_dynaconf(app)

    if test or app.config.get('TESTING'):
        app.testing = True

    if ext_list:
        for ext in ext_list:
            configure_extension(ext, app=app)

    return app
Exemplo n.º 2
0
def create_app_base(test=False, ext_list=None, **settings):
    """Creates basic app only with extensions provided in ext_list
    useful for testing."""

    app = QuokkaApp('quokka')
    if settings:
        app.config.update(settings)
    configure_dynaconf(app)

    if test or app.config.get('TESTING'):
        app.testing = True

    app.static_folder = Path.cwd() / Path('static')
    # Path(app.config['PROJECT_ROOT'])

    if ext_list:
        for ext in ext_list:
            configure_extension(ext, app=app)

    return app