Add favorite_places to user profile page.

This commit is contained in:
Marcus Scholz 2020-12-24 17:59:05 +01:00
parent e601b9bf6b
commit 734d09df90
2 changed files with 17 additions and 0 deletions

View File

@ -60,6 +60,22 @@
</div>
</div>
<section class="LP-Section">
<div class="LP-PlaceList">
<h1 class="LP-Headline">{% trans 'Favorite places' %}</h1>
<ul class="LP-PlaceList__List">
{% for place in favorite_places %}
<li class="LP-PlaceList__Item">
{% include 'partials/place_teaser.html' with place=place extended=True %}
</li>
{% endfor %}
</ul>
{% include 'partials/nav/pagination.html' %}
</div>
</section>
<section class="LP-Section">
<div class="LP-PlaceList">
<h1 class="LP-Headline">{% trans 'Places submitted by' %} {{explorer.user.username}}</h1>

View File

@ -23,6 +23,7 @@ class ExplorerProfileView(IsAuthenticatedMixin, View):
'explorer': explorer,
'place_count': place_count,
'place_list': place_list,
'favorite_places': explorer.favorite_places.all(),
'assets': {}
}