Skip to content

Instantly share code, notes, and snippets.

@precillieo
Created January 31, 2021 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save precillieo/1c6fbbbe8d94c5269d05582b8ee8eddb to your computer and use it in GitHub Desktop.
Save precillieo/1c6fbbbe8d94c5269d05582b8ee8eddb to your computer and use it in GitHub Desktop.
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