mirror of https://github.com/django/django.git
Fixed #198 -- istartswith and iendswith weren't working properly. Thanks, brantley
git-svn-id: http://code.djangoproject.com/svn/django/trunk@321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
8a86e7713f
commit
5a3da949fa
|
@ -1645,9 +1645,9 @@ class Field(object):
|
||||||
return ["%%%s%%" % prep_for_like_query(value)]
|
return ["%%%s%%" % prep_for_like_query(value)]
|
||||||
elif lookup_type == 'iexact':
|
elif lookup_type == 'iexact':
|
||||||
return [prep_for_like_query(value)]
|
return [prep_for_like_query(value)]
|
||||||
elif lookup_type == 'startswith':
|
elif lookup_type in ('startswith', 'istartswith'):
|
||||||
return ["%s%%" % prep_for_like_query(value)]
|
return ["%s%%" % prep_for_like_query(value)]
|
||||||
elif lookup_type == 'endswith':
|
elif lookup_type in ('endswith', 'iendswith'):
|
||||||
return ["%%%s" % prep_for_like_query(value)]
|
return ["%%%s" % prep_for_like_query(value)]
|
||||||
elif lookup_type == 'isnull':
|
elif lookup_type == 'isnull':
|
||||||
return []
|
return []
|
||||||
|
|
Loading…
Reference in New Issue