Merge pull request #2239 from bookwyrm-social/unauth-lists

Show lists to logged out viewers
This commit is contained in:
Mouse Reeve 2022-07-23 21:02:03 -07:00 committed by GitHub
commit 056f9c45a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,10 @@ class Lists(View):
def get(self, request): def get(self, request):
"""display a book list""" """display a book list"""
if request.user.is_authenticated:
lists = ListsStream().get_list_stream(request.user) lists = ListsStream().get_list_stream(request.user)
else:
lists = models.List.objects.filter(privacy="public")
paginated = Paginator(lists, 12) paginated = Paginator(lists, 12)
data = { data = {
"lists": paginated.get_page(request.GET.get("page")), "lists": paginated.get_page(request.GET.get("page")),