Flash Message Not Showing Up

122 Views Asked by At

The flash messages do not show up and I need someone to help me figure it out.

I am trying to flash messages on my website but the flash messages do not show anytime I hit the submit button. [my source file]z(https://i.stack.source file hereimgur.com/v8Xly.jpg)

1

There are 1 best solutions below

0
Michael Quarcoo On

You probably forgot to call get_flashed_messages() in your HTML template.

<body>  
    {% with messages = get_flashed_messages() %}  
         {% if messages %}  
               {% for message in messages %}  
                    <p>{{ message }}</p>  
               {% endfor %}  
         {% endif %}  
      {% endwith %}  
<!-- Sign-up form goes here -->  
</body>  

More information here