add.html 778 B

1234567891011121314151617181920212223242526272829303132333435
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>添加</title>
  6. <style>
  7. .err {
  8. color: red;
  9. font-size: 14px;
  10. }
  11. </style>
  12. </head>
  13. <body>
  14. <h2>添加违章记录</h2>
  15. <hr>
  16. <p>
  17. {% for hint in hints %}
  18. <div class="err">{{ hint }}</div>
  19. {% endfor %}
  20. </p>
  21. <form action="/add" method="post">
  22. {% for field in f.visible_fields %}
  23. <div>
  24. {{ field.label }}
  25. {{ field }}
  26. {% for error in field.errors %}
  27. <span class="err">{{ error }}</span>
  28. {% endfor %}
  29. </div>
  30. {% endfor %}
  31. {% csrf_token %}
  32. <input type="submit" value="添加">
  33. </form>
  34. </body>
  35. </html>