Answers for "how to excluid null field in django orm"

4

django is null

MyModel.objects.filter(field__isnull = False)
Posted by: Guest on October-05-2020
0

how to add condition if null value in django orm

Name.objects.exclude(alias__isnull=True).exclude(alias__exact='')
Posted by: Guest on January-13-2021

Python Answers by Framework

Browse Popular Code Answers by Language