diff --git a/kuk.py b/kuk.py index 6b05cdd..02f9aba 100644 --- a/kuk.py +++ b/kuk.py @@ -213,9 +213,9 @@ def addme(): if current_user.name not in meal.eaters: meal.eaters.append(current_user.name) save() - return Response('
Have a nice meal!
') + return render_template('appresponse.html', message='Have a nice meal!') else: - return Response('only one meal per person!
') + return render_template('appresponse.html', message='Only one meal per person!') #anti-adding to meal @app.route("/removeme") @@ -225,9 +225,9 @@ def removeme(): if current_user.name in meal.eaters: meal.eaters.remove(current_user.name) save() - return 'no food for you!
' + return render_template('appresponse.html', message='No food for you!') else: - return 'insert joke here
' + return render_template('appresponse.html', message='Insert joke here') # make a new meal @app.route("/volunteer") @@ -237,9 +237,9 @@ def volunteer(): if meal.kuk == '': meal.kuk = current_user.name save() - return 'we commend you for your bravery!
' + return render_template('appresponse.html', message='We commend you for your bravery!') else: - return '2 cooks is 1 too many
' + return render_template('appresponse.html', message='2 cooks is 1 too many!') # finishing the meal @app.route("/finish") @@ -248,7 +248,7 @@ def finish(): meal = Meal.getCurrent() meal.account() save() - return 'Meal closed!
' + return render_template('appresponse.html', message='Meal closed!') # make a new meal @app.route("/plan") @@ -259,7 +259,7 @@ def plan(): # leaders = [p for p in leaderboard if p['score'] == leaderboard[0]['score']] # meal.kuk = random.choice(leaders)['name'] + '?' save() - return 'meal waiting!
' + return render_template('appresponse.html', message='Meal waiting!') # somewhere to logout @app.route("/logout") diff --git a/templates/appresponse.html b/templates/appresponse.html new file mode 100644 index 0000000..b10b63c --- /dev/null +++ b/templates/appresponse.html @@ -0,0 +1,10 @@ + + + +{{message}}
+ + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 0e38707..a305c67 100644 --- a/templates/index.html +++ b/templates/index.html @@ -12,6 +12,7 @@ background-position: left top; background-repeat: no-repeat; background-size: 100% auto; + background-color: #aeaeac; }