mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #8597 -- Allow the use of strings containing underscores and percentage
signs in "iexact" queries on PostgreSQL again (this case was missed in [8536]). git-svn-id: http://code.djangoproject.com/svn/django/trunk@8646 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -901,6 +901,18 @@ Pickling of DateQuerySets used to fail
|
||||
>>> qs = Item.objects.dates('created', 'month')
|
||||
>>> _ = pickle.loads(pickle.dumps(qs))
|
||||
|
||||
Bug #8597: regression tests for case-insensitive comparisons
|
||||
>>> _ = Item.objects.create(name="a_b", created=datetime.datetime.now(), creator=a2, note=n1)
|
||||
>>> _ = Item.objects.create(name="x%y", created=datetime.datetime.now(), creator=a2, note=n1)
|
||||
>>> Item.objects.filter(name__iexact="A_b")
|
||||
[<Item: a_b>]
|
||||
>>> Item.objects.filter(name__iexact="x%Y")
|
||||
[<Item: x%y>]
|
||||
>>> Item.objects.filter(name__istartswith="A_b")
|
||||
[<Item: a_b>]
|
||||
>>> Item.objects.filter(name__iendswith="A_b")
|
||||
[<Item: a_b>]
|
||||
|
||||
"""}
|
||||
|
||||
# In Python 2.3 and the Python 2.6 beta releases, exceptions raised in __len__
|
||||
|
||||
Reference in New Issue
Block a user