Hello world
Case:
1 from the Flask Import Flask 2 # create an application Flask 3 # The first parameter specifies the template Flask corresponding start location from which to find a static document in decision 4 App = Flask ( __name__ , 5 static_path = " / static " , # represents the static file access path . 6 static_url_path = ' / the python27 ' , . 7 = static_folder ' static ' # represents a file storage directory . 8 templete_folder = ' Templete ' # represents the template file storage directory 9 ) 10 11 # decorator routing function to be associated with the view 12 is app.route @ ( ' / ' ) 13 is DEF index (): 14 return " Hello World " 15 16 IF the __name__ == __main__ : . 17 app.run ()
Loading configuration: app.config.from_object () object loaded from