diff --git a/bookwyrm/templates/book/edit_book.html b/bookwyrm/templates/book/edit_book.html index af5d4d695..1702cf5d8 100644 --- a/bookwyrm/templates/book/edit_book.html +++ b/bookwyrm/templates/book/edit_book.html @@ -109,7 +109,10 @@

{{ error | escape }}

{% endfor %} -

{{ form.series }}

+

+ + +

{% for error in form.series.errors %}

{{ error | escape }}

{% endfor %} diff --git a/bookwyrm/templates/lists/list.html b/bookwyrm/templates/lists/list.html index 2f0e7d678..a9f8e5c0e 100644 --- a/bookwyrm/templates/lists/list.html +++ b/bookwyrm/templates/lists/list.html @@ -30,26 +30,32 @@ {% include 'snippets/shelve_button/shelve_button.html' with book=item.book %} - diff --git a/bookwyrm/templates/snippets/status/status_content.html b/bookwyrm/templates/snippets/status/status_content.html index 402c4aabd..fd3c7ee70 100644 --- a/bookwyrm/templates/snippets/status/status_content.html +++ b/bookwyrm/templates/snippets/status/status_content.html @@ -1,5 +1,3 @@ -{% spaceless %} - {% load bookwyrm_tags %} {% load i18n %} @@ -134,4 +132,3 @@ {% endif %} {% endif %} {% endwith %} -{% endspaceless %} diff --git a/bookwyrm/templates/snippets/trimmed_text.html b/bookwyrm/templates/snippets/trimmed_text.html index e1728b8f6..6a3fa007b 100644 --- a/bookwyrm/templates/snippets/trimmed_text.html +++ b/bookwyrm/templates/snippets/trimmed_text.html @@ -1,4 +1,3 @@ -{% spaceless %} {% load bookwyrm_tags %} {% load i18n %} @@ -46,4 +45,3 @@ {% endwith %} {% endif %} {% endwith %} -{% endspaceless %} diff --git a/bookwyrm/tests/views/test_user.py b/bookwyrm/tests/views/test_user.py index 055edae25..7518b2bf0 100644 --- a/bookwyrm/tests/views/test_user.py +++ b/bookwyrm/tests/views/test_user.py @@ -30,6 +30,14 @@ class UserViews(TestCase): self.rat = models.User.objects.create_user( "rat@local.com", "rat@rat.rat", "password", local=True, localname="rat" ) + self.book = models.Edition.objects.create(title="test") + with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"): + models.ShelfBook.objects.create( + book=self.book, + user=self.local_user, + shelf=self.local_user.shelf_set.first(), + ) + models.SiteSettings.objects.create() self.anonymous_user = AnonymousUser self.anonymous_user.is_authenticated = False diff --git a/bookwyrm/views/books.py b/bookwyrm/views/books.py index 2a47c0d2b..0c61d1a20 100644 --- a/bookwyrm/views/books.py +++ b/bookwyrm/views/books.py @@ -270,10 +270,10 @@ class Editions(View): if request.GET.get("format"): filters["physical_format__iexact"] = request.GET.get("format") - editions = work.editions.order_by("-edition_rank").all() + editions = work.editions.order_by("-edition_rank") languages = set(sum([e.languages for e in editions], [])) - paginated = Paginator(editions.filter(**filters).all(), PAGE_LENGTH) + paginated = Paginator(editions.filter(**filters), PAGE_LENGTH) data = { "editions": paginated.get_page(request.GET.get("page")), "work": work, diff --git a/bookwyrm/views/user.py b/bookwyrm/views/user.py index 9c79a77c2..02db5971b 100644 --- a/bookwyrm/views/user.py +++ b/bookwyrm/views/user.py @@ -59,7 +59,7 @@ class User(View): { "name": user_shelf.name, "local_path": user_shelf.local_path, - "books": user_shelf.books[:3], + "books": user_shelf.books.all()[:3], "size": user_shelf.books.count(), } )