{% extends "base.html" %} {% macro ingredientpart(ing) -%} {{ing.amount|numprint}} {{ing["unit"].name}} {{ ing.name }} {%- endmacro %} {% macro ingredient(ing) -%} {{ingredientpart(ing)}} {% if ing.alternatives|length != 0 %} {% for alting in ing.alternatives %} or {{ingredientpart(alting)}} {% endfor %} {% endif %} {%- endmacro %} {% macro getrecipe(rec) -%} {% for subrecipe in rec.subrecipes %} {{getrecipe(subrecipe)}} {% endfor %}