예제 #1
0
def create_app_base(config=None, test=False, admin_instance=None,
                    ext_list=None, **settings):
    app = QuokkaApp('quokka')
    app.config.load_quokka_config(config=config, test=test, **settings)
    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
예제 #2
0
def create_app_base(config=None, test=False, admin_instance=None, **settings):
    app = QuokkaApp(__name__)
    app.config.load_config(config=config, test=test, **settings)

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

    @app.route('/')
    def hello_world():
        return 'Hello World!'

    return app
예제 #3
0
def create_app_base(config=None, test=False, admin_instance=None, **settings):
    app = QuokkaApp(__name__)
    app.config.load_config(config=config, test=test, **settings)

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

    @app.route('/')
    def hello_world():
        return 'Hello World!'

    return app
예제 #4
0
파일: __init__.py 프로젝트: gmsjy/quokka_ng
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
예제 #5
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
예제 #6
0
파일: __init__.py 프로젝트: zming619/quokka
def create_app_base(config=None, test=False, admin_instance=None, **settings):
    app = QuokkaApp('quokka')
    app.config.load_quokka_config(config=config, test=test, **settings)
    if test or app.config.get('TESTING'):
        app.testing = True
    return app
예제 #7
0
파일: __init__.py 프로젝트: Cetids/quokka
def create_app_base(config=None, test=False, admin_instance=None, **settings):
    app = QuokkaApp('quokka')
    app.config.load_quokka_config(config=config, test=test, **settings)
    if test or app.config.get('TESTING'):
        app.testing = True
    return app
예제 #8
0
def create_app_min(config=None, test=False):
    app = QuokkaApp('quokka')
    app.config.load_quokka_config(config=config, test=test)
    return app