Changes between Initial Version and Version 1 of Ticket #20516, comment 5
- Timestamp:
- Dec 7, 2013, 3:36:31 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #20516, comment 5
initial v1 5 5 Something like: 6 6 7 s = MyModel.objects.filter(foo__bar=Param('able'), baz=Param('baker')).exclude(foo_quux=7)7 stmt = MyModel.objects.filter(foo__bar=Param('able'), baz=Param('baker')).exclude(foo_quux=7) 8 8 9 9 Though perhaps an explicit "prepare()" would be better, the Param arguments mark where to bind parameters, and what to call them. … … 11 11 The, you can execute the query with: 12 12 13 for my in s (able=1, baker="wibble")13 for my in stmt(able=1, baker="wibble"):