rename parts to subrecipes

This commit is contained in:
Emi Vasilek 2023-11-06 07:41:55 +01:00
parent 6b31462d2c
commit 353aee80cb
3 changed files with 31 additions and 21 deletions

View file

@ -14,16 +14,16 @@
{%block body %}
<a href="index.html">back</a>
<h1>{{recipe.title}}</h1>
{% for part in recipe.parts %}
{% if recipe.parts|length != 1 %}
<h2>{{part.title}}</h2>
{% for subrecipe in recipe.subrecipes %}
{% if recipe.subrecipes|length != 1 %}
<h2>{{subrecipe.title}}</h2>
{% endif %}
<h3>Ingredients</h3>
{% for ing in part.ingredients %}
{% for ing in subrecipe.ingredients %}
<li>{{ingredient(ing)}}</li>
{% endfor %}
<h3>Steps</h3>
{% for step in part.steps %}
{% for step in subrecipe.steps %}
<li>{{ step }}</li>
{% endfor %}
<hr>