diff --git a/undercover/routes.py b/undercover/routes.py index c925510..e2a2646 100644 --- a/undercover/routes.py +++ b/undercover/routes.py @@ -63,13 +63,22 @@ class CLForm(Form): ) -@writing_blueprint.route('/login', methods=['POST']) +@writing_blueprint.route('/login', methods=['POST', 'GET']) def login_post(): - username = request.form['username'] - if db.login(username, request.form['password']): - session['username'] = username - return redirect('/') - return make_response("", 401) + if request.method == 'POST': + username = request.form['username'] + if db.login(username, request.form['password']): + session['username'] = username + return redirect('/') + return make_response("", 401) + + return ''' +
+

+

+

+
+ ''' @writing_blueprint.route('/', methods=['GET'])