Answer the question
In order to leave comments, you need to log in
How does .all() work on select_related in Django?
Hello, I'm learning about the set.all() function, I can't catch up with how it is formed. Let's say I get records from a category
category = Category.objects.select_related().get(id=id)
books = category.book_set.all()
Answer the question
In order to leave comments, you need to log in
where does the book attribute come from in the books_set code?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question