allow using a single string as an ingredient instead of a dict
This commit is contained in:
parent
072aa03a53
commit
883f0756f9
5 changed files with 59 additions and 17 deletions
|
@ -1,6 +1,11 @@
|
|||
{% extends "base.html" %}
|
||||
{% macro ingredientpart(ing) -%}
|
||||
{% if recipe.price != None %}{{price(ing.price)}} {%endif%}{{ing.amount|amountprint}} {{ing["unit"].name}} {{ ing.name }} {{ing.note}}
|
||||
{% if recipe.price != None %}{{price(ing.price)}} {%endif%}
|
||||
{% if ing.amount != None %} {{ing.amount|amountprint}}
|
||||
{% if ing.unit != None %} {{ing.unit.name}}{% endif %}
|
||||
{%endif%}
|
||||
{{ ing.name }}
|
||||
{% if ing.note != "" %} {{ing.note}}{% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro ingredient(ing) -%}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue