Use

objects.filter

———

e.g.,

>>>Card.objects.filter(name=’Hot Pot’)

>>>Card.objects.filter(name=’Hot Pot’, city=’San Diego’)

>>>Card.objects.filter(name_contains=’Hot’)

[<Card: Hot Pot>]

Note that here filter() returned a

QuerySet

which is like a list.

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 2011 Web Oom Suffusion theme by Sayontan Sinha
Switch to our mobile site
Top Footer