Boston Python Workshop/Saturday/Web app project: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 313:
If you want to search your database, you can do it using the '''filter''' method on the ''objects'' attribute of Poll. For example:
 
>>> ppolls = Poll.objects.filter(question="What's up?")
>>> ppolls
[<Poll: What's up?>]
>>> ppolls[0].id
1
 
Anonymous user