Python Flask WT-Forms Introduction

preview_player
Показать описание
In this video we look at a simple Python-Flask application that involves a WT-Form. The form includes a just a StringField (text input) and SubmitField (submit input). The flask portion handles the routes: A default route that redirects to the "simple form" route. The simple form route communicates with the WTForm class and uses render_template to connect to some HTML files in the templates folder. Depending on whether or not one is responding to the user clicking the submit button, the route leads either to a form or a form handler. The form renders an HTML version of the form class established by WTForm and communicated by Flask. The form handler receives and displays the information entered and submitted by the user. Both HTML files extend a shared HTML layout file which in turn links to a cascading style sheet (css) file.
Рекомендации по теме