forked from mirrors/bookwyrm
Removes discover books page
This commit is contained in:
parent
6e1c116329
commit
c3092c4979
3 changed files with 0 additions and 35 deletions
|
@ -1,17 +0,0 @@
|
|||
{% extends 'layout.html' %}
|
||||
{% load fr_display %}
|
||||
{% block content %}
|
||||
<div class="content-container">
|
||||
<h2>Recently Added Books</h2>
|
||||
<div class="book-grid row wrap shrink">
|
||||
{% for book in books %}
|
||||
<div class="cover-container">
|
||||
<a href="/book/{{ book.id }}">
|
||||
{% include 'snippets/book_cover.html' with book=book %}
|
||||
</a>
|
||||
{% include 'snippets/shelve_button.html' with book=book %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -46,7 +46,6 @@ urlpatterns = [
|
|||
path('', views.home),
|
||||
re_path(r'^(?P<tab>home|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),
|
||||
|
|
|
@ -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 '''
|
||||
|
|
Loading…
Reference in a new issue