- Language: en
- Documentation version: 2.0
9. How to filter FileField without any file?¶
ImageField stores the path of the file or image. At the DB level they are same as a
So to find FileField without any file we can query as under.
no_files_objects = MyModel.objects.filter( Q(file='')|Q(file=None) )