这是我的模板:
<form action="{% url "calculate" %}>
<label2>
<select name="ASSETS_filn">
<option selected>Files</option>
{% for document in documents %}
<option>{{ document.filename }}</option>
{% endfor %}
</select>
</label2>
<br>
<label>Date</label>
<input class="button3" type="text" name="DATE_val" />
<input class="button3" type="submit" value="Calculate" />
</form>
label2是一个下拉菜单。我的目标是:允许用户从下拉菜单中选择一个项目,并在日期框中输入数据。这是处理此问题的视图:
^{pr2}$但是写入.txt
文件的是hehe
和{request.POST
是空的吗?在
By default, the method of form submit is ^{} ,你打算做一个
POST
。在因此,请指定方法:
另外,最好检查一下方法:
^{pr2}$相关问题 更多 >
编程相关推荐