Files
06-Note/Python-100-Days/Day41-55/car/templates/add.html
sherlockforrest bf2ed2e31f 更新
2023-06-20 09:22:53 +08:00

35 lines
778 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>添加</title>
<style>
.err {
color: red;
font-size: 14px;
}
</style>
</head>
<body>
<h2>添加违章记录</h2>
<hr>
<p>
{% for hint in hints %}
<div class="err">{{ hint }}</div>
{% endfor %}
</p>
<form action="/add" method="post">
{% for field in f.visible_fields %}
<div>
{{ field.label }}
{{ field }}
{% for error in field.errors %}
<span class="err">{{ error }}</span>
{% endfor %}
</div>
{% endfor %}
{% csrf_token %}
<input type="submit" value="添加">
</form>
</body>
</html>