Added dynamic PlaceImage output in template.

This commit is contained in:
Marcus Scholz 2020-07-27 21:00:26 +02:00
parent 3f2ad1ca19
commit 1c401532ad

View File

@ -7,7 +7,7 @@
<article class="LP-PlaceOverview"> <article class="LP-PlaceOverview">
<div class="LP-PlaceOverview__Info"> <div class="LP-PlaceOverview__Info">
<img class="LP-PlaceOveriew__Image" src="{% static 'images/Bildschirmfoto_von_2020-07-13_20-15-00.png' %}"> <img class="LP-PlaceOveriew__Image" src="{{ place.images.first.filename.url }}">
<article class="LP-PlaceOverView__Description"> <article class="LP-PlaceOverView__Description">
<div class="LP-TextSection"> <div class="LP-TextSection">
<h1 class="LP-Headline LP-Headline--main">{{place.name}}</h1> <h1 class="LP-Headline LP-Headline--main">{{place.name}}</h1>
@ -61,24 +61,11 @@
<h2 class="LP-Headline LP-Headline">Bilder</h2> <h2 class="LP-Headline LP-Headline">Bilder</h2>
<div class=" LP-Content"> <div class=" LP-Content">
<ul class="LP-PlaceOverView__ImageList"> <ul class="LP-PlaceOverView__ImageList">
{% for place_image in place.images.all %}
<li class="LP-PlaceOverView__ImageItem"> <li class="LP-PlaceOverView__ImageItem">
<a href="#"><img src="{% static 'images/Bildschirmfoto_von_2020-07-13_11-03-07.png' %}"></a> <a href="{{ place_image.filename.url }}"> <img src="{{ place_image.filename.url }}"></a>
</li>
<li class="LP-PlaceOverView__ImageItem">
<a href="#"><img src="{% static 'images/photo_2020-05-02_18-11-21.jpg' %}"></a>
</li>
<li class="LP-PlaceOverView__ImageItem">
<a href="#"><img src="{% static 'images/Bildschirmfoto_von_2020-07-13_11-03-07.png' %}"></a>
</li>
<li class="LP-PlaceOverView__ImageItem">
<a href="#"><img src="{% static 'images/Bildschirmfoto_von_2020-07-13_20-15-00.png' %}"></a>
</li>
<li class="LP-PlaceOverView__ImageItem">
<a href="#"><img src="{% static 'images/Bildschirmfoto_von_2020-07-13_11-03-07.png' %}"></a>
</li>
<li class="LP-PlaceOverView__ImageItem">
<a href="#"><img src="{% static 'images/photo_2020-05-02_18-11-21.jpg' %}"></a>
</li> </li>
{% endfor %}
</ul> </ul>
</div> </div>
</article> </article>