On 12/23/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
hi whats the best way of retrieving names that start with either 'a', 'b' or 'c'. I need something like: Model.objects.filter(name__startswith__range('a','c')
Use Q objects to OR three queries together. Model.objects.filter(Q(name__startswith='a') | Q(name_startswith='b') | Q(name_startswith='c')) Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---