Django not like statement -


how use not in django queries

    model.objects.filter(keywords not "null" or "undefined")         select * model keywords not "%undefined%"  or keywords not "%null%"; 

use exclude function , q objects

model.objects.exclude(q(keyword__contains='undefined') | q(keyword__contains='null')) 

Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

email - PHP Mail Error "The Page at X Says: E-Mail can not be sent!" -

Optimized Line drawing in QT -