html for basic flask home page python

Solutions on MaxInterview for html for basic flask home page python by the best coders in the world

showing results for - "html for basic flask home page python"
Bianca
25 Jan 2017
1# import the Flask class from the flask module
2from flask import Flask, render_template
3
4# create the application object
5app = Flask(__name__)
6
7# use decorators to link the function to a url
8@app.route('/')
9def home():
10    return "Hello, World!"  # return a string
11
12@app.route('/welcome')
13def welcome():
14    return render_template('welcome.html')  # render a template
15
16# start the server with the 'run()' method
17if __name__ == '__main__':
18    app.run(debug=True)
19
similar questions
queries leading to this page
html for basic flask home page python