in flaskr.py, there was a little mistake in my code. I wrote request.method's' to check the request method!