示例#1
0
def setup_app(env, debug=False, output_path=None, ui_lang='en'):
    app = Flask('lektor.admin')
    app.lektor_info = LektorInfo(env, output_path, ui_lang)
    app.debug = debug
    app.config['PROPAGATE_EXCEPTIONS'] = True

    register_modules(app)

    return app
示例#2
0
文件: webui.py 项目: jab/lektor
def setup_app(env, debug=False, output_path=None, lang="en"):
    app = Flask("lektor.admin")
    app.lektor_info = LektorInfo(env, output_path, lang)
    app.debug = debug
    app.config["PROPAGATE_EXCEPTIONS"] = True

    register_modules(app)

    return app
示例#3
0
def setup_app(env, debug=False, output_path=None, lang='en'):
    app = Flask('lektor.admin')
    app.lektor_info = LektorInfo(env, output_path, lang)
    app.debug = debug
    app.config['PROPAGATE_EXCEPTIONS'] = True

    register_modules(app)

    return app
示例#4
0
    def __init__(self, env, debug=False, output_path=None, ui_lang='en',
                 verbosity=0, build_flags=None):
        Flask.__init__(self, 'lektor.admin', static_url_path='/admin/static')
        self.lektor_info = LektorInfo(env, output_path, ui_lang,
                                      build_flags=build_flags,
                                      verbosity=verbosity)
        self.debug = debug
        self.config['PROPAGATE_EXCEPTIONS'] = True

        register_modules(self)
示例#5
0
    def __init__(
        self,
        env,
        debug=False,
        output_path=None,
        ui_lang="en",
        verbosity=0,
        extra_flags=None,
    ):
        Flask.__init__(self, "lektor.admin", static_url_path="/admin/static")
        self.lektor_info = LektorInfo(
            env, output_path, ui_lang, extra_flags=extra_flags, verbosity=verbosity
        )
        self.debug = debug
        self.config["PROPAGATE_EXCEPTIONS"] = True

        register_modules(self)