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

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -