Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Show the meal number on the nutrition PDF, next to the time

Roland Geidera713a7a1ce80
diff --git a/nutrition/views.py b/nutrition/views.py
index 8e4e62e3f..11aab925e 100644
--- a/nutrition/views.py
+++ b/nutrition/views.py
@@ -180,10 +180,14 @@ def export_pdf(request, id):
# Meals
+ i = 0
for meal in plan.meal_set.select_related():
+ i += 1
+
meal_markers.append(len(data))
- P = Paragraph('<para align="center"><strong>%s</strong></para>' % meal.time,
+ P = Paragraph('<para align="center"><strong>%s - %s</strong></para>' %
+ (i, meal.time or '-/-'),
styleSheet["Normal"])
data.append([P])