aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/templates/_formhelpers.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/templates/_formhelpers.html b/app/templates/_formhelpers.html
new file mode 100644
index 0000000..1aa63d0
--- /dev/null
+++ b/app/templates/_formhelpers.html
@@ -0,0 +1,12 @@
+{% macro render_field(field) %}
+ <dt>{{ field.label }}
+ <dd>{{ field(class="form-control",**kwargs)|safe }}
+ {% if field.errors %}
+ <ul class=errors>
+ {% for error in field.errors %}
+ <li>{{ error }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ </dd>
+{% endmacro %} \ No newline at end of file