Added test data

master
Davide Bongiovanni 6 years ago
parent 8fc7a954ab
commit ff15cb81c1

@ -20,19 +20,23 @@ meals = {}
def getLeaderboard(): def getLeaderboard():
leaders = [] leaders = []
leaders.append({'name':'marek', 'score':'34'}) leaders.append({'name':'marek', 'score':34})
leaders.append({'name':'sven', 'score':'16'}) leaders.append({'name':'sven', 'score':16})
return {} return leaders
def getUpcomingMeals(): def getUpcomingMeals():
meals = [] 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':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}) 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('/') @app.route('/')
def index(): 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__': if __name__ == '__main__':
with open('admin.json') as f: with open('admin.json') as f:

Loading…
Cancel
Save