Merge pull request 'fixed list, handled wrong email case, adjusted template' (#1) from issue#1 into main

Reviewed-on: #1
This commit is contained in:
Yann 2025-06-20 12:34:47 +00:00
commit 2317006de9
2 changed files with 17 additions and 5 deletions

View File

@ -26,9 +26,11 @@ def index():
@app.route('/showSummary',methods=['POST'])
def showSummary():
club = [club for club in clubs if club['email'] == request.form['email']][0]
return render_template('welcome.html',club=club,competitions=competitions)
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'))
@app.route('/book/<competition>/<club>')
def book(competition,club):

View File

@ -6,6 +6,16 @@
</head>
<body>
<h1>Welcome to the GUDLFT Registration Portal!</h1>
{% with messages = get_flashed_messages()%}
{% if messages %}
<ul>
{% for message in messages %}
<li>{{message}}</li>
{% endfor %}
</ul>
{% endif%}
{% endwith %}
Please enter your secretary email to continue:
<form action="showSummary" method="post">
<label for="email">Email:</label>