{% extends "base.html" %} {% block content %}
| Day | Meals | Calories | Protein | Carbs | Fat | Net Carbs | Actions |
|---|---|---|---|---|---|---|---|
|
{{ day.name }} {{ day.display }} |
{% set meals_by_time = {} %}
{% for plan in plans[day.date.isoformat()] %}
{% if plan.meal_time not in meals_by_time %}
{% set _ = meals_by_time.update({plan.meal_time: []}) %}
{% endif %}
{% set _ = meals_by_time[plan.meal_time].append(plan) %}
{% endfor %}
{% for meal_time in ["Breakfast", "Lunch", "Dinner", "Snack 1", "Snack 2", "Beverage 1", "Beverage 2"] %}
{{ meal_time }}:
{% if meals_by_time[meal_time] %}
{% for plan in meals_by_time[meal_time] %}
{{ plan.meal.name }}
{% endfor %}
{% else %}
No meals
{% endif %}
{% endfor %}
{% if not plans[day.date.isoformat()] %}
No meals
{% endif %}
|
{{ "%.0f"|format(daily_totals[day.date.isoformat()].calories or 0) }} | {{ "%.1f"|format(daily_totals[day.date.isoformat()].protein or 0) }}g ({{ daily_totals[day.date.isoformat()].protein_pct or 0 }}%) |
{{ "%.1f"|format(daily_totals[day.date.isoformat()].carbs or 0) }}g ({{ daily_totals[day.date.isoformat()].carbs_pct or 0 }}%) |
{{ "%.1f"|format(daily_totals[day.date.isoformat()].fat or 0) }}g ({{ daily_totals[day.date.isoformat()].fat_pct or 0 }}%) |
{{ "%.1f"|format(daily_totals[day.date.isoformat()].net_carbs or 0) }}g |