Complete virtual environment added to git. Updated all changes to file in frontend directory
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
from flask import Flask, request, render_template, url_for, redirect
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route("/")
|
||||
def groclist_home():
|
||||
return render_template('index.html')
|
||||
|
||||
@app.route("/welcome")
|
||||
def groclist_welcome():
|
||||
return render_template("welcome.html")
|
||||
|
||||
@app.route("/login", methods=['GET', 'POST'])
|
||||
def groclist_login():
|
||||
error = None
|
||||
if request.method == 'POST':
|
||||
if request.form['username'] != 'admin' or request.form['password'] != 'admin':
|
||||
error = 'Username of wachtwoord onbekend. Probeer opnieuw'
|
||||
else:
|
||||
return redirect(url_for('groclist_welcome'))
|
||||
return render_template("login.html", error=error)
|
||||
|
||||
# start server with run method
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True)
|
||||
Reference in New Issue
Block a user