Jun-11-2020, 06:38 AM
(This post was last modified: Jun-11-2020, 06:39 AM by card51shor.)
@app.route("/login") def login(): password = request.form.get("password") username = request.form.get("username") usernamedata = db.execute("SELECT username FROM users WHERE username=:username", {"username":username}).fetchone() passworddata = db.execute("SELECT password FROM users WHERE username=:username", {"username":username}).fetchone() if username == usernamedata AND password == passworddata: return render_template("welcome.html") else: return render_template("login.html")Ok now i have this and it's still giving me an error saying:
File "C:\school\project1\application.py", line 39
passworddata = db.execute("SELECT password FROM users WHERE username=:username",{"username":username}).fetchone()
^
TabError: inconsistent use of tabs and spaces in indentation
But I looked it up and fetchone() is used.