bev-a-tron/MyFlaskTutorial — pull request #12 by iwangu (2014-05-04 17:57:18+00:00)
Title: Fix use of Flask's redirect

Currently, code seems to result in "405 Method Not Allowed" HTTP Response (on Chrome), when one submits the 'How many eyes do you have?' question. I see two ways to fix this.

First, call redirect('/usefulfunction_lulu', code=307) instead of redirect('/usefulfunction_lulu'). See more about the underlying issue here: http://stackoverflow.com/questions/15473626/make-a-post-request-while-redirecting-in-flask

Second, omit the "methods=['POST']" in @app_lulu.route('/usefulfunction_lulu'). I suggest this, because it is consistent with 7_finale.rst, in which @app_lulu.route('/main_lulu') also does not restrict on POST.