tags:

views:

53

answers:

2

Does Django have a field lookup like __not_equal? (Field lookups are __exact, __contains, etc.)

+5  A: 

Use one of __exact, __contains etc. with exclude() instead of filter().

Ben James
+3  A: 

You can also use the Q object and negate it.

E.g.

Poll.objects.filter(~Q(question='Who'))
Felix Kling