Changes between Initial Version and Version 1 of Ticket #20516, comment 5


Ignore:
Timestamp:
Dec 7, 2013, 3:36:31 AM (11 years ago)
Author:
FunkyBob

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20516, comment 5

    initial v1  
    55Something like:
    66
    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)
    88
    99Though perhaps an explicit "prepare()" would be better, the Param arguments mark where to bind parameters, and what to call them.
     
    1111The, you can execute the query with:
    1212
    13     for my in s(able=1, baker="wibble")
     13    for my in stmt(able=1, baker="wibble"):
Back to Top