烧瓶无法识别发布请求

时间:2019-12-23 15:13:05

标签: python html flask

我正在做一个烧瓶项目。

我想从表单中检索数据并将其存储在数据库中。

但是服务器无法识别发布请求,因此我无法检索或存储任何数据

  

html代码    

base R

我在下面的代码中使用flask和sqllite

  

python代码“注册功能”

xtabs(value ~ name + payment.reason, data)
#    payment.reason
#name    bonus commission discretionary bonus
#  Alex      0          0                2500
#  John   6000       2500                   0
#  Marie     0       2000                   0

i`v尝试了很多事情并搜索了类似的问题,但这对我的情况没有帮助

提前谢谢!

  

更新

这是服务器响应

<div class="container-lg p-3 border mt-6 mb-3" style="max-width: 460px;">
  <form action="{{ url_for('registration') }}"  method="POST" class="ui form" id="add-user" >
    <dl class="mt-2 form-group">
      <dt><label for="name">Full Name</label></dt>
      <dd>
        <input
          type="text"
          class="form-control bg-white"
          name="name"
          id="name"s
          placeholder="Enter your name"
          required
          autofocus
        />
      </dd>
    </dl>
    <dl class="mt-2 form-group">
      <dt><label for="email">Email Address</label></dt>
      <dd>
        <input
          type="email"
          class="form-control bg-white"
          name="email"
          id="email"
          placeholder="Enter your email"
          required
        />
      </dd>
    </dl>

    <div class="mt-2 form-group bg-white" onkeydown="remove_placeholder()">
      <label for="question-input-101" class="d-block mb-2">Skills</label>
      <div
        class="topic-input-container tag-input-container js-tag-input-container"
      >
        <div
          class="tag-input form-control js-tag-input-wrapper clearfix position-relative bg-white"
        >
          <ul class="js-tag-input-selected-tags">
            <li
              class="d-none topic-tag-action f6 float-left js-tag-input-tag js-template"
            >
              <span class="js-placeholder-tag-name"></span>
              <button
                type="button"
                class="delete-topic-button f5 no-underline ml-2 js-remove"
                tabindex="-1"
              >

              </button>
              <input
                type="hidden"
                name="answers[101][selections][]"
                class="js-topic-input"
                value=""
              />
            </li>
          </ul>

          <auto-complete
            src=""
            aria-owns="tag-popup"
            role="combobox"
            aria-haspopup="listbox"
            aria-expanded="false"
          >
            <input
              type="text"
              id="question-input-101"
              class="tag-input-inner form-control bg-white shorter d-inline-block p-0 my-1 border-0"
              autocomplete="off"
              autofocus=""
              aria-owns="tag-popup"
              spellcheck="false"
              aria-autocomplete="list"
              aria-controls="tag-popup"
              placeholder="Space separated"
              maxlength="40"
            />
            <ul
              class="suggester border width-full bg-white left-0"
              id="tag-popup"
              style="top: 100%;"
              hidden=""
              role="listbox"
            ></ul>
          </auto-complete>

          <input
            type="hidden"
            name="answers[101][choice]"
            id="answers_101_choice"
            value="474"
            class="form-control"
          />
        </div>
      </div>
    </div>

    <p class="mt-3 note">
      What languages, frameworks, technologies, or skills do you have/know?
    </p>
    <p class="note" style="margin-top: -6px">
      e.g. html, python, machine-learning.
    </p>

    <button
      class="btn btn-lg mt-4 btn-blue btn-block"
      type="submit"
      onclick="parse()"
    >
      Add yourself
    </button>
    <div class="ui success message">
      <div class="header">Registered Successfully!</div>
      <p>
        Now, please check your inbox and verify your email.<br />
        <b>Note:</b> You won't appear in the search results unless you
        verify your email.
      </p>
    </div>
    <div class="ui error message">
      <div class="header">Something Went Wrong!</div>
      <p id="error-message"></p>
    </div>
  </form> </prev>

0 个答案:

没有答案