0Pricing
Flask Academy · Lesson

Flash Messages Between Requests

Show one-time notices after a redirect.

The One-Time Notice

After saving a form you often want to show Saved! once, then never again. Flask calls this a flash message. ✨

Why Not Just Pass It

The trick is that you usually redirect after a save, and the redirect loses your variables. Flash survives that hop for you.

All lessons in this course

  1. Set and Read the session Dict
  2. The SECRET_KEY and Signed Cookies
  3. Set Custom Cookies on a Response
  4. Flash Messages Between Requests
← Back to Flask Academy