From d7103658abe26ba248fbb7ff6ccc06fdce651617 Mon Sep 17 00:00:00 2001 From: Nick Garanko Date: Thu, 7 Mar 2024 13:55:31 +0100 Subject: [PATCH] Add WTForm field descriptions in Edit/Create forms(#722) --- sqladmin/templates/create.html | 3 +++ sqladmin/templates/edit.html | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sqladmin/templates/create.html b/sqladmin/templates/create.html index cfe5484c..e05521d7 100644 --- a/sqladmin/templates/create.html +++ b/sqladmin/templates/create.html @@ -26,6 +26,9 @@

New {{ model_view.name }}

{% for error in field.errors %}
{{ error }}
{% endfor %} + {% if field.description %} + {{ field.description }} + {% endif %} {% endfor %} diff --git a/sqladmin/templates/edit.html b/sqladmin/templates/edit.html index e8d693dd..ae51125c 100644 --- a/sqladmin/templates/edit.html +++ b/sqladmin/templates/edit.html @@ -26,6 +26,9 @@

Edit {{ model_view.name }}

{% for error in field.errors %}
{{ error }}
{% endfor %} + {% if field.description %} + {{ field.description }} + {% endif %} {% endfor %}