Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ lib
.Python
tests/
.envrc
__pycache__
__pycache__
.idea/
8 changes: 7 additions & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ def index():

@app.route('/showSummary',methods=['POST'])
def showSummary():
club = [club for club in clubs if club['email'] == request.form['email']][0]

club = next((club for club in clubs if club['email'] == request.form['email']), None)

if club is None:
flash("Sorry, that email wasn't found.")
return render_template("index.html", error="Email not found"), 404

return render_template('welcome.html',club=club,competitions=competitions)


Expand Down
11 changes: 11 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
</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>
Expand Down