diff --git a/clubs.json b/clubs.json index 46bed31..b3800e6 100644 --- a/clubs.json +++ b/clubs.json @@ -7,10 +7,10 @@ { "name":"Iron Temple", "email": "admin@irontemple.com", - "points":"47" + "points":"4" }, { "name":"She Lifts", "email": "kate@shelifts.co.uk", "points":"12" } -]} \ No newline at end of file +]} diff --git a/competitions.json b/competitions.json index 039fc61..ea636df 100644 --- a/competitions.json +++ b/competitions.json @@ -7,7 +7,7 @@ }, { "name": "Fall Classic", - "date": "2020-10-22 13:30:00", + "date": "2025-10-22 13:30:00", "numberOfPlaces": "13" } ] diff --git a/server.py b/server.py index bc1b2d7..fa42478 100644 --- a/server.py +++ b/server.py @@ -32,7 +32,7 @@ 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, now=now) - flash("The email isn't found") + flash("Sorry, that email wasn't found") return redirect(url_for('index')) @app.route('/book//') @@ -65,10 +65,11 @@ def purchasePlaces(): if places[competition['name']] <= 12: if placesRequired <= points: competition['numberOfPlaces'] = int(competition['numberOfPlaces']) - placesRequired - print(club['points']) if not competition['name'] in session: session[competition['name']] = placesRequired flash(f"Great ! {placesRequired} places booked for {competition['name']}") + # flash('Great-booking complete!') + else: flash("You don't have enough points") else: diff --git a/templates/welcome.html b/templates/welcome.html index 642c93e..2116d89 100644 --- a/templates/welcome.html +++ b/templates/welcome.html @@ -5,7 +5,7 @@ Summary | GUDLFT Registration -

Welcome, {{club['email']}}

Logout +

Welcome, {{club['email']}}

Logout {% with messages = get_flashed_messages()%} {% if messages %} @@ -15,7 +15,7 @@ {% endfor %} {% endif%} - Points available: {{club['points']}} + Points available: {{club['points']}}

Competitions: