Excerpts from nicolas lubkov's message of Mon Jan 24 04:18:18 -0200 2011: > hi all is pretty simple my question. > > when im making a query in django i use this > > result = person.objects.filter(name = "nick", lastname = "smith") > > this is like "select * from person where name = 'nick' and lastname = 'smith > > i cant figure it out how to make > "select * from person where name = 'nick' OR lastname = 'smith
Take a look to Q objects: http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects -- MatÃas Aguirre <matiasagui...@gmail.com> -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.