Boolean Logic in a Query

54 views
Skip to first unread message

Ben Racine

unread,
May 22, 2012, 12:34:47 AM5/22/12
to django-...@googlegroups.com
This is probably low hanging fruit, but given that I'm using AND/OR in all of my google searches... that isn't getting me very far. 

I'm just trying to figure out how to differentiate between a LOGICAL AND and a LOGICAL OR when making a query.  


Further, I need to know how to nest them, e.g. how to form the REST equivalent of the following python syntax:

(True or False) and (True or False)

Any and all help greatly appreciated.




--
- Sent from an aging laptop that no longer has a working webcam, audio and  can't receive wireless from more than 15ft away.

Nick Doyle

unread,
Nov 16, 2012, 1:12:00 AM11/16/12
to django-...@googlegroups.com
For ORing - I think your best option is to override the Resource's build_filters() and use Django's Q object.
Reply all
Reply to author
Forward
0 new messages