{% load static %}
← Back to diary

Add food

{% if product %}
{% if product.image_url %}{% endif %}

{{ product.product_name }}

{% include "food/partials/favourite_button.html" with is_favourite=product.is_favourite %}
{% if product.brand %}

{{ product.brand }}

{% endif %}

Per 100 {{ product.base_unit }}: {% if product.energy_kcal_100 is not None %}{{ product.energy_kcal_100|floatformat:0 }} kcal{% else %}— kcal{% endif %}

Nutrition information
Carbohydrates
{{ product.carbohydrates_100|default_if_none:'—' }} g
Protein
{{ product.protein_100|default_if_none:'—' }} g
Fat
{{ product.fat_100|default_if_none:'—' }} g
Saturated fat
{{ product.saturated_fat_100|default_if_none:'—' }} g
Sugars
{{ product.sugars_100|default_if_none:'—' }} g
Fibre
{{ product.fibre_100|default_if_none:'—' }} g
Salt
{{ product.salt_100|default_if_none:'—' }} g
{% if product.source == 'openfoodfacts' %}

Product data from Open Food Facts.

{% endif %}

Edit product nutrition

{% csrf_token %} {% include 'food/partials/portion_fields.html' %}
{{ form.inventory_package.label_tag }} {% if inventory_packages %}{{ inventory_packages|length }} measured package{{ inventory_packages|length|pluralize }}: {{ inventory_total_original|floatformat:-3 }} {{ product.base_unit }} originally · {{ inventory_total_available|floatformat:-3 }} {{ product.base_unit }} available now{% endif %} {{ form.inventory_package.errors }} {% if not inventory_packages %}No measured stock available for this product. You can still log food.{% endif %}

{{ form.non_field_errors }}
{% else %} {% if tab == 'overview' and not query %}

Favourites

{% include 'food/partials/product_list.html' with products=favourites %}

Recent

{% include 'food/partials/product_list.html' with products=recents %}
{% else %}{% include 'food/partials/product_list.html' with products=products %}{% endif %}
Create a food manually {% if not is_demo_account %}Scan barcode Search Open Food Facts{% endif %}
{% if not is_demo_account %}
{% csrf_token %}
{% endif %} {% if not is_demo_account %}

External product data from Open Food Facts.

{% endif %} {% endif %}
{% if product %}{% endif %} {% if not product and not is_demo_account %}{% endif %}