<!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>