From ff15cb81c133ca5549cc3a1cb6adc1abf171ec41 Mon Sep 17 00:00:00 2001 From: Davide Bongiovanni Date: Wed, 28 Nov 2018 21:34:09 +0100 Subject: [PATCH] Added test data --- kukv1.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/kukv1.py b/kukv1.py index d4ac9e8..9883072 100644 --- a/kukv1.py +++ b/kukv1.py @@ -20,19 +20,23 @@ meals = {} def getLeaderboard(): leaders = [] - leaders.append({'name':'marek', 'score':'34'}) - leaders.append({'name':'sven', 'score':'16'}) - return {} + leaders.append({'name':'marek', 'score':34}) + leaders.append({'name':'sven', 'score':16}) + return leaders def getUpcomingMeals(): meals = [] meals.append({'id':1, 'kuk':'davide', 'eaters':['marek','sven','wille'], 'flavor_text':'Pizza', 'date':'Tuesday 21st of November', 'selection_deadline':'23 hours 14 minutes', 'status':0}) meals.append({'id':2, 'kuk':'marek', 'eaters':['davide','sven','david', 'wille'], 'flavor_text':'Grzybowa', 'date':'Friday 23rd of November', 'selection_deadline':'3 Days 23 hours', 'status':0}) - return {} + meals.append({'id':2, 'kuk':'marek', 'eaters':['davide','sven','david', 'wille'], 'flavor_text':'Grzybowa', 'date':'Friday 23rd of November', 'selection_deadline':'3 Days 23 hours', 'status':0}) + meals.append({'id':2, 'kuk':'marek', 'eaters':['davide','sven','david', 'wille'], 'flavor_text':'Grzybowa', 'date':'Sunday 25rd of November', 'selection_deadline':'3 Days 23 hours', 'status':0}) + meals.append({'id':2, 'kuk':'marek', 'eaters':['davide','sven','david', 'wille'], 'flavor_text':'Grzybowa', 'date':'Sunday 25rd of November', 'selection_deadline':'3 Days 23 hours', 'status':0}) + meals.append({'id':2, 'kuk':'marek', 'eaters':['davide','sven','david', 'wille'], 'flavor_text':'Grzybowa', 'date':'Monday 26rd of November', 'selection_deadline':'3 Days 23 hours', 'status':0}) + return meals @app.route('/') def index(): - return render_template('index-new.html', leaderboard=getLeaderboard(), upcomingMeals=getUpcomingMeals(), current_user_name='Wille') + return render_template('meal_list.html', leaderboard=getLeaderboard(), meals=getUpcomingMeals(), current_user_name='Wille') if __name__ == '__main__': with open('admin.json') as f: