Django queries: __iexact doesn't work with non-ASCII? -


>>> p = pet(kind="Кошка") >>> p.kind '\xd0\x9a\xd0\xbe\xd1\x88\xd0\xba\xd0\xb0' >>> p.save() >>> pet.objects.get(kind__iexact="кошка") traceback... # traces doesnotexist: pet matching query not exist. >>> p = pet(kind="cat") >>> p.save() >>> pet.objects.get(kind__iexact="cat") <pet: pet object> 

or there db-level reasons (i'm using sqlite3)?

that's not unicode.

p = pet(kind=u"Кошка") p.save() print pet.objects.get(kind__iexact=u"кошка") 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -