fix field mapping
parent
1150b985a3
commit
beb38456bb
|
@ -27,7 +27,7 @@ def insertBookToBookshelf(bookId, bookshelfId):
|
||||||
def booksInBookshelf(request, bookshelfId):
|
def booksInBookshelf(request, bookshelfId):
|
||||||
bookshelfName = Bookshelf.objects.get(id=bookshelfId).bookshelf
|
bookshelfName = Bookshelf.objects.get(id=bookshelfId).bookshelf
|
||||||
idList = BookshelfToBook.objects.filter(fk_bookshelves=bookshelfId).values_list('fk_books', flat=True)
|
idList = BookshelfToBook.objects.filter(fk_bookshelves=bookshelfId).values_list('fk_books', flat=True)
|
||||||
books = Book.objects.filter(id__in=idList).order_by('bookshelf')
|
books = Book.objects.filter(id__in=idList).order_by('title')
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
'books': books,
|
'books': books,
|
||||||
|
|
Loading…
Reference in New Issue