added 3 login tests

This commit is contained in:
2025-06-30 14:02:22 +02:00
parent a50d1946ce
commit 1009ebfc1e
7 changed files with 127 additions and 8 deletions

View File

@@ -26,11 +26,15 @@ def index():
@app.route('/showSummary',methods=['POST'])
def showSummary():
club = [club for club in clubs if club['email'] == request.form['email']]
if club:
return render_template('welcome.html', club=club[0], competitions=competitions)
flash("The email isn't found")
return redirect(url_for('index'))
try:
club = [club for club in clubs if club['email'] == request.form['email']][0]
# if club:
return render_template('welcome.html', club=club, competitions=competitions)
# flash("Sorry, that email wasn't found")
# return redirect(url_for('index'))
except IndexError:
flash("Sorry, that email wasn't found")
return redirect(url_for('index'))
@app.route('/book/<competition>/<club>')
def book(competition,club):