fix admin

master
Fox Wilson 2016-04-16 14:31:15 -04:00
parent 7d3a3ee48b
commit cb4fe5187d
1 changed files with 2 additions and 2 deletions

View File

@ -24,8 +24,8 @@ def admin_login():
elif request.method == "POST":
username = request.form["username"]
password = request.form["password"]
if "admin_username" in secret:
if username == secret["admin_username"] and password == secret["admin_password"]:
if getattr(secret, "admin_username", False):
if username == secret.admin_username and password == secret.admin_password:
session["admin"] = username
return redirect(url_for(".admin_dashboard"))
else: