If you're using PosgreSQL, django.contrib.postgres provides such a function.
--
Aymeric.
> Le 6 mai 2015 à 02:52, Paulo Maciel a écrit :
>
> I am returning the query Something.objects.all().order_by(Lower('name')) but
> the order is not respecting names that start with accent, causing these
Hi Paulo,
Your issue can be solved by modifying the database collation or with
application code (E.g. SlugField). The django-developer mailing is for
discussion of the Django framework. The django-users mailing list is the
appropriate place to start/continue a discussion about how you can resolve
This is part of the database collation, and as I understand the Django
docs it's not something Django handles internally. It's something you
set/tweak inside your database.
What database are you using? On MySQL the docs say to set a column
collation. On Oracle I believe you can change the NLS_SORT
I am returning the query Something.objects.all().order_by(Lower('name'))
but the order is not respecting names that start with accent, causing these
results appear at the end of ordering. We need a function to ignore accents
and order correctly names with accents, as well as function Lower trea