Hii Team,
In Django model QuerySets, I see that there is a __gt and __lt for comparitive values, but is there a __ne/!=/<> (not equals?)
I want to filter out using a not equals:
Example:
Model:
bool a;
int x;
I want
results = Model.objects.exclude(a=true, x!=5)
The != is not correct syntax. I tried __ne, <>.
I ended up using:
results = Model.objects.exclude(a=true, x__lt=5).exclude(a=true, x__gt=5)
Any help?