recettes/templates/recette.html
2018-10-28 12:03:29 +01:00

34 lines
857 B
HTML

{% extends 'base.html' %}
{% block title %}{{ recette.nom }}{% endblock %}
{% block content %}
<h1>{{ recette.nom }}</h1>
<div>{{ recette.prep|linebreaksbr }}</div>
{% if recette.ingredients.count %}
<div class="ingredients">
<h2>Ingrédients</h2>
<ul>
{% for comp in recette.composition_set.all %}
<li>{{ comp }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if recette.photo_instr %}
<div class="photo" style="max-width: 48%"><img src="{{ recette.photo_instr.url }}">
</div>
{% endif %}
{% if recette.photo %}
<div class="photo"{% if recette.ingredients.count or recette.photo_instr %} style="max-width: 48%"{% endif %}><img src="{{ recette.photo.url }}">
</div>
{% endif %}
{% endblock %}
{% block footer %}
<div style="text-align: right;"><a href="{% url 'admin:recette_recette_change' recette.pk %}">Modifier</a></div>
{% endblock %}