#17473: Add like and ilike lookups ----------------------------------------------+-------------------- Reporter: pmartin | Owner: nobody Type: New feature | Status: new Component: Database layer (models, ORM) | Version: 1.3 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ----------------------------------------------+-------------------- Add like and ilike [http://docs.djangoproject.com/en/dev/topics/db/queries /#field-lookups lookups].
Should be possible to do something like this: {{{ MyModel.objects.filter(field_name__like='xx%YY%zz') MyModel.objects.filter(field_name__ilike='xx%yy%zz') User.objects.filter(username__like='a%in') }}} Instead of: {{{ MyModel.objects.filter(field_name__regex='^xx.*YY.*zz$') }}} It is more quick and more readable. I create the next [http://pypi.python.org/pypi/django-like app], after read the next [http://stackoverflow.com/questions/8644146/django-query- how-to-write-where-field-like-10-8-0 question] I didn't understand why this is not coded -- Ticket URL: <https://code.djangoproject.com/ticket/17473> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.