Re: Show only remaining books instead of all books

2022-05-01 Thread DW K
You have shared very little which means I will make some assumptions about your specific implementation need. I see you have a Book model that has total number of books. I imagine you want to *minus* or *add *to the total number of books every time a book is borrowed or new books are added to th

Show only remaining books instead of all books

2022-04-30 Thread Arshad Noman
In a book bank made in Django, I want to show only the remaining books instead of all books. This I want to upgrade in the code below def view_books_student(request): books = Book.objects.all() return render(request, "view_books_student.html", {'books':books}) -- You received t