From f3fd78ca2ecae47ecf8a4d8fe9087ce22edc29de Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 4 Jan 2011 16:07:45 +0530 Subject: [PATCH] default contains search --- pandora/item/managers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/item/managers.py b/pandora/item/managers.py index 770a5db5e..bf2b30f88 100644 --- a/pandora/item/managers.py +++ b/pandora/item/managers.py @@ -53,6 +53,8 @@ def parseCondition(condition): v = models.Item.objects.filter(facets__key=k, facets__value__istartswith=v) elif op == '$': v = models.Item.objects.filter(facets__key=k, facets__value__iendswith=v) + else: + v = models.Item.objects.filter(facets__key=k, facets__value__icontains=v) k = 'id__in' elif op == '=': value_key = 'find__value__iexact'