From 6f218e591ff441268c5050a9dbbfb1202c940fc2 Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Sun, 17 Apr 2016 15:06:54 +0200 Subject: [PATCH] add render_field macro to layout.html --- app/templates/layout.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/templates/layout.html b/app/templates/layout.html index f1ae071..b26e23f 100644 --- a/app/templates/layout.html +++ b/app/templates/layout.html @@ -4,6 +4,25 @@
  • Manual
  • {%- endmacro %} +{% macro render_field(field) %} +
    + +
    + {{ field(**kwargs)|safe }} + {% if field.errors %} +
      + {% for error in field.errors %} +
    • {{ error }}
    • + {% endfor %} +
    + {% endif %} +
    +
    +{% endmacro %} + +