proper recursive finding of conversions

This commit is contained in:
Emi Vasilek 2023-11-14 13:36:49 +01:00
parent 5fd453759b
commit ffa0253193
4 changed files with 71 additions and 25 deletions

View file

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% macro ingredientpart(ing) -%}
{% if ing.price != None %}{{ing.price|round(1)|numprint}}{%else%} ?{%endif%} {{ing.amount|amountprint}} {{ing["unit"].name}} {{ ing.name }}
{{price(ing)}} {{ing.amount|amountprint}} {{ing["unit"].name}} {{ ing.name }} {{ing.note}}
{%- endmacro %}
{% macro ingredient(ing) -%}
@ -22,6 +22,7 @@
{% for ing in rec.ingredients %}
<li>{{ingredient(ing)}}</li>
{% endfor %}
price: {{ price(rec) }}
{% endif %}
{% if rec.steps|length != 0 %}
<h3>Steps</h3>