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 -

Optimized Line drawing in QT -

datetime - str to time in python -