refactored following flask the dococument of Pattner of Flask
Merge remote-tracking branch 'origin/master'