def info_book(request, isbn): borrows = Borrow.objects.filter(Q(record__booki__book__isbn=isbn)&Q(record__action__exact='B')) return info_book_in_template(request, isbn, borrows, 'normal_user/book.html', 'normal-user')
def info_book(request, isbn): records = Record.objects.filter(booki__book__isbn=isbn).order_by('-time') return info_book_in_template(request, isbn, records, 'book_admin/book.html', 'book-admin')