Created
January 31, 2021 17:04
-
-
Save precillieo/1c6fbbbe8d94c5269d05582b8ee8eddb to your computer and use it in GitHub Desktop.
This file contains 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, url_for | |
#instantiate the flask app | |
app= Flask(__name__) | |
#create each of the routes. The home page route | |
@app.route("/") | |
@app.route("/home") | |
def home(): | |
return render_template('home.html') | |
#about page route | |
@app.route("/about") | |
def about(): | |
return render_template('about.html') | |
#portfolio page route | |
@app.route("/portfolio", methods= ['GET', 'POST']) | |
def portfolio(): | |
return render_template('portfolio.html') | |
#contact me page route | |
@app.route("/contact") | |
def contact(): | |
return render_template('contact.html') | |
if __name__=="__main__": | |
app.run(debug= True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment