相关疑难解决方法(0)

将数据从HTML表单发送到Flask中的Python脚本

我的Python脚本中有以下代码:

def cmd_wui(argv, path_to_tx):
    """Run a web UI."""
    from flask import Flask, flash, jsonify, render_template, request
    import webbrowser
    app = Flask(__name__)


    @app.route('/tx/index/')
    def index():
        """Load start page where you select your project folder
        or load history projects from local DB."""
        from txclib import get_version
        txc_version = get_version()
        prj = project.Project(path_to_tx)

        # Let's create a resource list from our config file
        res_list = []
        prev_proj = ''
        for idx, res in enumerate(prj.get_resource_list()):
                hostname = prj.get_resource_host(res)
        username, password = prj.getset_host_credentials(hostname)
        return render_template('init.html', …
Run Code Online (Sandbox Code Playgroud)

html python forms input flask

62
推荐指数
2
解决办法
17万
查看次数

标签 统计

flask ×1

forms ×1

html ×1

input ×1

python ×1