Answer the question
In order to leave comments, you need to log in
How to modify queryset in Django?
Hello, tell me how you can solve this problem:
There is a Lesson model with lessons, in which there is a raiting field (a field that indicates how many points should be received to complete the lesson)
I want to add one more parameter to the queryset, whether the student has reached this number of points or not.
It is considered so, the id of the student is transmitted, he gets his points for the lesson.
So the problem is that I want to pass my parameter to the queryset, which will affect the selection, namely, add a new calculated field to the selection.
How can you do it right? How to pass some values outside to the queryset so that they already modify the selection?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question