URL中的Flask可选参数

时间:2017-06-19 23:05:30

标签: python python-3.x flask

我有一个端点:

<form action="{{ url_for('register.register_account') }}" method="post">
        <input name="first_name" class="user" type="text" required="" placeholder="{{ user_data["first_name"] }}" disabled/><br>
        <input name="first_name" class="user" type="text" required="" placeholder="{{ user_data["last_name"] }}" disabled/><br>
        <input name="email" class="user" type="text" required="" placeholder="{{ user_data["email"] }}" disabled/><br>
        <input  placeholder="Password" name="password" class="pass" type="password" required=""><br>
        <input  placeholder="Password verification" name="password_verification" class="pass" type="password" required=""><br>
        {{ form.csrf_token }}
        <input type="submit" value="">
    </form>

GET端点显示以下格式:

Could not build url for endpoint 'register.register_account'. Did you forget to specify values ['token']?

当用户填写它时,它应该在上面的POST端点上发布,问题是我有一个错误:

 .tween("attr.fill", function() {
        var node = this;
        return function(t) { 
         console.log(node.getAttribute("cx"));
        }
      })

我该如何解决这个问题?我可以选择令牌吗?什么是解决我问题的最佳架构?

0 个答案:

没有答案