django - query filter on manytomany is empty -


in django there way filter on manytomany field being empty or null.

class testmodel(models.model):     name = models.charfield(_('set name'), max_length=200)     manytomany = models.manytomanyfield('anothermodel', blank=true, null=true)  print testmodel.objects.filter(manytomany__is_null=true) 

print testmodel.objects.filter(manytomany=none) 

Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

Optimized Line drawing in QT -

datetime - str to time in python -