mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-22 16:16:39 +00:00
Merge pull request #2239 from bookwyrm-social/unauth-lists
Show lists to logged out viewers
This commit is contained in:
commit
056f9c45a4
1 changed files with 4 additions and 1 deletions
|
@ -17,7 +17,10 @@ class Lists(View):
|
||||||
|
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
"""display a book list"""
|
"""display a book list"""
|
||||||
lists = ListsStream().get_list_stream(request.user)
|
if request.user.is_authenticated:
|
||||||
|
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")),
|
||||||
|
|
Loading…
Reference in a new issue