Code

Changes between Initial Version and Version 1 of Ticket #16893


Ignore:
Timestamp:
09/20/11 11:10:58 (3 years ago)
Author:
aaugustin
Comment:

Fixed formatting (you can use "preview" before submitting a ticket).

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16893

    • Property Patch needs improvement unset
    • Property Needs tests unset
    • Property Needs documentation unset
  • Ticket #16893 – Description

    initial v1  
    11Not sure if this is a bug. 
    22 
    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 
     3I 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()`. 
    44 
    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.)