diff --git a/kukv1.py b/kukv1.py index f509346..bb63f38 100644 --- a/kukv1.py +++ b/kukv1.py @@ -49,10 +49,7 @@ def getUpcomingMeals(): meals = [] for row in r: meals.append(dict(row)) - print (meals) - print ('deadline ' + str(meals[-1]['selection_deadline'] )) seconds_to_deadline = (meals[-1]['selection_deadline'] - datetime.datetime.now()).total_seconds() - print(str(seconds_to_deadline) + ' s to dead') if seconds_to_deadline < 0: meals[-1]['selection_deadline'] = 'Deadline passed' elif seconds_to_deadline > 3600: @@ -62,6 +59,8 @@ def getUpcomingMeals(): meals[-1]['selection_deadline'] = str(days_td) + ' days ' + str(hours_td) + ' hours' else: meals[-1]['selection_deadline'] = str(round(seconds_to_deadline / 60)) + ' minutes' + meals[-1]['meal_time'] = meals[-1]['meal_date'].strftime('%H:%M') + meals[-1]['meal_date'] = meals[-1]['meal_date'].strftime('%A %d %B') r.close() return meals diff --git a/templates/meal_list.html b/templates/meal_list.html index 2cfeb86..3b4126c 100644 --- a/templates/meal_list.html +++ b/templates/meal_list.html @@ -33,13 +33,17 @@
Cook
+Eaters {% for e in meal.eaters %} {% endfor %}
+