Skip to content

Instantly share code, notes, and snippets.

@angelabauer
Created September 24, 2020 14:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save angelabauer/44487345a2be90f7a8d684b8467fd028 to your computer and use it in GitHub Desktop.
Save angelabauer/44487345a2be90f7a8d684b8467fd028 to your computer and use it in GitHub Desktop.
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def home():
return render_template('index.html')
@app.route("login")
def login():
return render_template("login.html")
if __name__ == '__main__':
app.run(debug=True)
@RishavSinghh
Copy link

RishavSinghh commented Jan 10, 2021

There should be forward slash '/' before login
The code should be
@app.route("/login") def login(): return render_template("login.html")

Otherwise it is showing error
Screenshot 2021-01-10 at 11 52 02 AM

@NSAKGBM16CIA
Copy link

Yeah must be a typo, she works really hard!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment