Like You have a Table Student with column "name"
so if you need to filter your object based in given list with some names .
Answer :
namelist =['first','second','third','fourth']
obj = Student.objects.filter(name__in=namelist)
so if you need to filter your object based in given list with some names .
Answer :
namelist =['first','second','third','fourth']
obj = Student.objects.filter(name__in=namelist)
No comments:
Post a Comment