I have a model field defined as follows:
class Room(models.Model):
...
...
is_course = models.BooleanField("Is Room a Course?", default= False)
Now, I’m trying to find all the records in my database that have a False value for the is_course field.
I try the following, but it doesn’t seem to work:
myrooms = Room.objects.filter(is_course= False)
What is the correct way to do this/
The query is correct. Make sure there are records in the database being queried. Do a Room.objects.all() and examine any for the is_course = to False.