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

Опубликовано: 28 Июль 2023
на канале: 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.


Смотрите видео Python Flask WT-Forms: Choosing defaults among WTF choices and Jinja-HTML Select Language Mode онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Thomas Blum 28 Июль 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 55 раз и оно понравилось 1 людям.