From e52c18a09cabd374093b06ef0f521767cd228ba6 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 24 Jun 2020 23:39:05 +0530 Subject: make it better --- app/templates/wtform.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 app/templates/wtform.html (limited to 'app/templates/wtform.html') diff --git a/app/templates/wtform.html b/app/templates/wtform.html new file mode 100644 index 0000000..6d9add5 --- /dev/null +++ b/app/templates/wtform.html @@ -0,0 +1,20 @@ +{% extends 'base.html' %} + +{% block main %} +

WTForms in Flask

+

Here we are using the Flask-WTF library to create and process a form. Flask-WTF also comes with CSRF protection and validation classes.

+
+ {% include 'flash_messages.html' %} + {{ form.csrf_token }} +
+ {{ form.firstname.label }} {{ form.firstname(class="form-control") }} +
+
+ {{ form.lastname.label }} {{ form.lastname(class="form-control") }} +
+
+ {{ form.email.label }} {{ form.email(class="form-control", placeholder="jdoe@example.com") }} +
+ +
+{% endblock %} \ No newline at end of file -- cgit v1.2.3