Answer the question
In order to leave comments, you need to log in
Django, Postgres - why doesn't unaccent work in tests?
Tried to run both through ORM and without.
offers = list(Product.objects.filter(name__unaccent='текст'))
cur.execute("select * from catalog_product where unaccent(name)= 'текст'")
django.db.utils.ProgrammingError: function unaccent(character varying) does not exist
LINE 1: ...g_product"."updated" FROM "catalog_product" WHERE UNACCENT("...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
class Migration(migrations.Migration):
operations = [
UnaccentExtension()
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question