Quantcast
Viewing latest article 3
Browse Latest Browse All 3

Flask message flashing fails across redirects

I'm currently working on a project using Flask and Google App Engine. Calling get_flashed_messages() returns empty when I flash a message then use a redirect():

@views.route('/todo/add', methods=["POST"])
def add_todo():
    flash('hey')
    return redirect(url_for('todo_list')) 

However, if I comment out

# SERVER_NAME = 'localhost'

then it seems to work fine. My problem is that I have to use subdomains so I need SERVER_NAME to be set.

What is the deal?


Viewing latest article 3
Browse Latest Browse All 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>