[Fixed]-Django: icontains over unicode string

1👍

You can use unaccent, to make accent insensitive queries. This only works with postgres, and on Django 1.8+ I believe.

If this isn’t applicable to you, then you can’t do this directly. One potential alternative is to store an unaccented version of the string in a new field and search by that. There’s a library for getting the closest possible regular string from a unicode one.

👤NS0

Leave a comment