Get back-and-forth of form validation working

This commit is contained in:
Luke Murphy
2020-07-02 13:04:10 +02:00
parent 5dffc7db72
commit 44b0658a31
3 changed files with 91 additions and 11 deletions

View File

@ -1,3 +1,5 @@
{% from "second/macros.html" import with_errors %}
<!DOCTYPE html>
<html lang="en">
<head>
@ -9,10 +11,8 @@
<p>Install {{ app_name }}</p>
<form method="POST" action="/deploy/{{ app_name }}">
{% for field in form %}
<div>
{{ field.label() }}
{{ field() }}
</div>
{{ with_errors(field, style='font-weight: bold') }}
{% endfor %}
<input type="submit" value="Deploy" />
</form>