【发布时间】:2020-06-11 22:47:04
【问题描述】:
我正在创建一个烧瓶应用程序来控制 pi gpios。我有一些复选框,即使在页面刷新或用户离开页面后,我也需要保留状态。
渲染页面的app.py代码
@app.route("/config")
def config():
return render_template("config.html")
复选框的 HTML 代码
<form>
<fieldset class="form-group">
<legend>Device Configuration</legend>
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" value="" id="check-soil">
Soil
</label>
</div>
</fieldset>
<button type="submit" class="btn btn-primary">Update</button>
</fieldset>
</form>
【问题讨论】:
标签: python html css python-3.x flask