Changes between Initial Version and Version 1 of Ticket #16893
- Timestamp:
- Sep 20, 2011, 1:10:58 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16893 – Description
initial v1 1 1 Not sure if this is a bug. 2 2 3 I was attempt to construct a Q object that wouldn't ever match anything (an API calls for a Q object to be returned, but certain situations call for nothing to be matched by it). I initially figured 3 I was attempt to construct a Q object that wouldn't ever match anything (an API calls for a Q object to be returned, but certain situations call for nothing to be matched by it). I initially figured `~ Q()` would do the trick, but that matches everything, just like a plain `Q()`. 4 4 5 ~ Q() 6 7 Would do the trick, but that matches everything, just like a plain Q(). 8 9 (I ended up using Q(pk__isnull=True), which is a hack but seems to be OK.) 5 (I ended up using `Q(pk__isnull=True)`, which is a hack but seems to be OK.)