SQLA (SQLAlchemy) Demo: Planets Database -- Update

Опубликовано: 01 Октябрь 2024
на канале: Thomas Blum
65
3

In this video we add a rudimentary update form and route to the Planets database. We use WTForms to create a form with a SelectField (drop-down select) for choosing the planet to be updated. The form also has a TextField (for the planet's name), two DecimalFields (for the planet's distance and period) and a SubmitField for entering the data. Because there is a small amount of data, the code follows the update by redirecting the route to the GridJS datatable.