Python Flask WT-Forms: Choosing defaults among WTF choices and Jinja-HTML Select Language Mode

Published: 28 July 2023
on channel: Thomas Blum
55
1

In this video we address two questions that have come up in our WT-Forms "Five Guys" example. The first involved in having some choices pre-selected. This scenario was achieved by having a "default" argument/parameter in the WT-Forms field. The default value for the RadioField was a string; the default value for the MultiCheckboxField was a list of strings. For the second issue of adding Jinja color-coding, we added the Better Jinja extension but more importantly going to the Select Language Mode (along the bottom right) for the HTML files then going to the top and choosing "Jinja HTML". That highlighted the {{ and {% in yellow and picked out some Jinja keywords like set, for and if in purple.


Watch video Python Flask WT-Forms: Choosing defaults among WTF choices and Jinja-HTML Select Language Mode online without registration, duration hours minute second in high quality. This video was added by user Thomas Blum 28 July 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 55 once and liked it 1 people.