{% extends "base.html" %} {% block content %}

Recept toevoegen

{% csrf_token %} {% for field in recept_form %}
{{ field.label }} {{ field.errors }}

{{ field }} {% if field.label == "Bereidingstijd" %}min.{% endif %}

{% if field.label == "Recept naam" %}
{% for form in hoeveelheid_formset %}

{% for field in form %} {{ field }} {% endfor %} Verwijder ingredient

{% endfor %} Voeg ingredient toe
{% endif %} {% if field.label == "Vegetarisch" %}
{% for foto in recept.fotos.all %}
{% endfor %}
{% for form in image_formset %}

{% for field in form %} {{ field }} {% endfor %}

{% endfor %}
Voeg foto toe
{% endif %} {% endfor %} {{ hoeveelheid_formset.management_form }} {{ image_formset.management_form }}
{% endblock %}