Iterational commit.

This commit is contained in:
Alex Huddleston 2020-03-01 18:54:10 -06:00
parent 16e5fa891c
commit a408fb003b

5
app.py
View file

@ -4,7 +4,10 @@ app = Flask(__name__)
@app.route('/login', methods=['GET', 'POST'])
def login():
if(request.method == 'POST'):
return render_template('')
if request.form['username'] != 'admin' or request.form['password'] != 'admin':
error = 'Invalid Credentials. Please try again.'
else:
return redirect(url_for('home'))
elif(request.method == 'GET'):
return render_template('login.html', error=None)
return 'ERROR: Invalid method.'