From the course: Full Stack Web Development with Flask

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

Flashing messages

Flashing messages

- [Christian] Flashing messages. Flask has a flashing system that allows you to flash messages or alert messages from the source to the view. In this video, we're going to create some alert messages from the view from the source using the flash method, and then we're going to go to the view and retrieve these messages using the get_flashed_messages function. Let's go and see how this is done. All right, now, let's go back in here and remove this now, close that. And then we are going to process this input form so when you click the Submit form, it's going to come back to itself. You need to validate that form, right? So to do that, we need to go into the routes here. When we process the form, you click the Submit button. It's going to come into this function here, and then we will have to validate that form. So we validate the form by calling this function call validate, form validate. We can go here, and before we…

Contents