Monday 23 October 2017

python - Flask, one flash message not getting displayed

I know flash is set up properly as all other flash
messages are being displayed correctly.



I have
updated one view. It used to call the flask route from a javascript window.location
function but now am using $.post() to send parameters to the route.



The location of the flash call hasn't changed
(I put a print statement just before it and that executes so I know the interpreter gets
to the flash call).



All code in the route's
method executes correctly but the flash message does not show and I am at a loss.
Nothing coming up from Google searches.



Here are
the last 3 lines in the route
method




db.session.commit()
flash('Database
Updated')
return
redirect(url_for('index'))

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...