diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-07-26 18:38:44 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-07-26 18:38:44 +0000 |
| commit | 5a3da949fa6825fd4f66becc3930272ea9432f69 (patch) | |
| tree | 9c0a6070243f22291ed3f4e8804a2ae72acacdc3 | |
| parent | 8a86e7713f26f6e91a9a25615073321b9dd842eb (diff) | |
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
| -rw-r--r-- | django/core/meta.py | 4 |
1 files 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 [] |
