commit
c529ecfb9d
|
@ -9,8 +9,8 @@
|
||||||
</h4>
|
</h4>
|
||||||
</header>
|
</header>
|
||||||
<div class="card-image is-flex">
|
<div class="card-image is-flex">
|
||||||
{% for book in list.books.all|slice:5 %}
|
{% for book in list.listitem_set.all|slice:5 %}
|
||||||
{% include 'snippets/book_cover.html' with book=book size="small" %}
|
{% include 'snippets/book_cover.html' with book=book.book size="small" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-content is-flex-grow-0">
|
<div class="card-content is-flex-grow-0">
|
||||||
|
|
|
@ -33,9 +33,7 @@
|
||||||
{% if lists %}
|
{% if lists %}
|
||||||
<section class="block content">
|
<section class="block content">
|
||||||
<h2 class="title">Recent Lists</h2>
|
<h2 class="title">Recent Lists</h2>
|
||||||
{% if request.user.list_set.exists %}
|
|
||||||
{% include 'lists/list_items.html' with lists=lists %}
|
{% include 'lists/list_items.html' with lists=lists %}
|
||||||
{% endif %}
|
|
||||||
</section>
|
</section>
|
||||||
<div>
|
<div>
|
||||||
{% include 'snippets/pagination.html' with page=lists path=path %}
|
{% include 'snippets/pagination.html' with page=lists path=path %}
|
||||||
|
|
|
@ -29,6 +29,7 @@ class Lists(View):
|
||||||
user = request.user if request.user.is_authenticated else None
|
user = request.user if request.user.is_authenticated else None
|
||||||
lists = models.List.objects.filter(
|
lists = models.List.objects.filter(
|
||||||
~Q(user=user),
|
~Q(user=user),
|
||||||
|
books__isnull=False,
|
||||||
).all()
|
).all()
|
||||||
lists = privacy_filter(request.user, lists, ['public', 'followers'])
|
lists = privacy_filter(request.user, lists, ['public', 'followers'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue