added recipe images

This commit is contained in:
vabene1111
2019-12-25 16:46:16 +01:00
parent e2301c0c3a
commit 3cb01d6332
10 changed files with 65 additions and 8 deletions

View File

@@ -15,7 +15,7 @@
<h3>{% trans 'Edit Recipe' %}</h3>
<form action="." method="post">
<form action="." method="post" enctype="multipart/form-data">
{% csrf_token %}
{% for field in form %}

View File

@@ -45,8 +45,9 @@
<br/>
{% endif %}
{% if ingredients %}
<div class="row">
<div class="row">
{% if ingredients %}
<div class="col col-md-6">
<div class="card">
<div class="card-body">
@@ -89,7 +90,15 @@
</div>
</div>
</div>
</div>
{% endif %}
{% if recipe.image %}
<div class="col col-md-6">
<img class="img img-fluid rounded" src="{{ recipe.image.url }}">
</div>
{% endif %}
</div>
{% if recipe.ingredients or recipe.image %}
<br/>
<br/>
{% endif %}