From 5a3da949fa6825fd4f66becc3930272ea9432f69 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 26 Jul 2005 18:38:44 +0000 Subject: [PATCH] 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 --- django/core/meta.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/core/meta.py b/django/core/meta.py index 5780432ee4..a8e0b18106 100644 --- a/django/core/meta.py +++ b/django/core/meta.py @@ -1645,9 +1645,9 @@ class Field(object): return ["%%%s%%" % prep_for_like_query(value)] elif lookup_type == 'iexact': return [prep_for_like_query(value)] - elif lookup_type == 'startswith': + elif lookup_type in ('startswith', 'istartswith'): return ["%s%%" % prep_for_like_query(value)] - elif lookup_type == 'endswith': + elif lookup_type in ('endswith', 'iendswith'): return ["%%%s" % prep_for_like_query(value)] elif lookup_type == 'isnull': return []