fixed list, handled wrong email case, adjusted template
This commit is contained in:
10
server.py
10
server.py
@@ -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):
|
||||
@@ -56,4 +58,4 @@ def purchasePlaces():
|
||||
|
||||
@app.route('/logout')
|
||||
def logout():
|
||||
return redirect(url_for('index'))
|
||||
return redirect(url_for('index'))
|
||||
|
||||
Reference in New Issue
Block a user