recettes/templates/recette.html

32 lines
784 B
HTML
Raw Normal View History

2018-05-26 16:01:04 +02:00
{% extends 'base.html' %}
{% block content %}
<h1>{{ recette.nom }}</h1>
2018-05-27 11:48:40 +02:00
<div>{{ recette.prep|linebreaksbr }}</div>
2018-05-26 16:01:04 +02:00
{% if recette.ingredients.count %}
2018-05-27 12:01:15 +02:00
<div class="ingredients">
2018-05-27 11:48:40 +02:00
<h2>Ingrédients</h2>
2018-05-26 16:01:04 +02:00
<ul>
2018-05-27 16:01:08 +02:00
{% for comp in recette.composition_set.all %}
2018-05-26 16:01:04 +02:00
<li>{{ comp }}</li>
{% endfor %}
</ul>
2018-05-27 12:01:15 +02:00
</div>
{% endif %}
2018-10-14 18:15:25 +02:00
{% if recette.photo_instr %}
<div class="photo"><img src="{{ recette.photo_instr.url }}">
</div>
{% endif %}
2018-05-27 12:01:15 +02:00
{% if recette.photo %}
2018-10-14 18:15:25 +02:00
<div class="photo"{% if recette.ingredients.count or recette.photo_instr %} style="max-width: 50%"{% endif %}><img src="{{ recette.photo.url }}">
</div>
2018-05-26 16:01:04 +02:00
{% endif %}
{% endblock %}
2018-05-26 16:55:07 +02:00
{% block footer %}
<div style="text-align: right;"><a href="{% url 'admin:recette_recette_change' recette.pk %}">Modifier</a></div>
{% endblock %}