From c3092c49797aaa5e0cc725d57e21f4ed130922d5 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 30 Sep 2020 16:30:50 -0700 Subject: [PATCH] Removes discover books page --- bookwyrm/templates/books.html | 17 ----------------- bookwyrm/urls.py | 1 - bookwyrm/views.py | 17 ----------------- 3 files changed, 35 deletions(-) delete mode 100644 bookwyrm/templates/books.html diff --git a/bookwyrm/templates/books.html b/bookwyrm/templates/books.html deleted file mode 100644 index 21aefd84..00000000 --- a/bookwyrm/templates/books.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends 'layout.html' %} -{% load fr_display %} -{% block content %} -
-

Recently Added Books

-
- {% for book in books %} -
- - {% include 'snippets/book_cover.html' with book=book %} - - {% include 'snippets/shelve_button.html' with book=book %} -
- {% endfor %} -
-
-{% endblock %} diff --git a/bookwyrm/urls.py b/bookwyrm/urls.py index ccfbe0ef..d091a070 100644 --- a/bookwyrm/urls.py +++ b/bookwyrm/urls.py @@ -46,7 +46,6 @@ urlpatterns = [ path('', views.home), re_path(r'^(?Phome|local|federated)/?$', views.home_tab), re_path(r'^notifications/?', views.notifications_page), - re_path(r'books/?$', views.books_page), re_path(r'import/?$', views.import_page), re_path(r'import_status/(\d+)/?$', views.import_status), re_path(r'user-edit/?$', views.edit_profile_page), diff --git a/bookwyrm/views.py b/bookwyrm/views.py index 30f01280..dac114d0 100644 --- a/bookwyrm/views.py +++ b/bookwyrm/views.py @@ -162,23 +162,6 @@ def search(request): return TemplateResponse(request, 'book_results.html', {'results': results}) -def books_page(request): - ''' discover books ''' - recent_books = models.Work.objects - recent_books = recent_books.order_by('-created_date')[:50] - recent_books = [b.default_edition for b in recent_books] - if request.user.is_authenticated: - recent_books = models.Edition.objects.filter( - ~Q(shelfbook__shelf__user=request.user), - id__in=[b.id for b in recent_books if b], - ) - - data = { - 'books': recent_books, - } - return TemplateResponse(request, 'books.html', data) - - @login_required def import_page(request): ''' import history from goodreads '''