Created
February 7, 2022 14:16
-
-
Save nedimcanulusoy/f1f64030876eb8bdc08e92917c6ce426 to your computer and use it in GitHub Desktop.
Create a route by Flask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask, render_template | |
| app = Flask(__name__) #imports name of the place the app is defined | |
| @app.route('/') #the route that we want to access | |
| def home(): #the function for the given route | |
| return render_template('index.html') #generates output from index.html file | |
| if __name__ == '__main__': | |
| app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment