Placeholder discover books page
This commit is contained in:
parent
c8a65ae6e1
commit
b1ad8ba317
4 changed files with 43 additions and 1 deletions
|
@ -95,6 +95,19 @@ def home_tab(request, tab):
|
|||
return TemplateResponse(request, 'feed.html', data)
|
||||
|
||||
|
||||
def books_page(request):
|
||||
''' discover books '''
|
||||
recent_books = models.Book.objects.filter(
|
||||
~Q(shelfbook__shelf__user=request.user)
|
||||
).order_by(
|
||||
'-created_date'
|
||||
)[:50]
|
||||
data = {
|
||||
'books': recent_books,
|
||||
}
|
||||
return TemplateResponse(request, 'books.html', data)
|
||||
|
||||
|
||||
def login_page(request):
|
||||
''' authentication '''
|
||||
# send user to the login page
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue