Re: New function to sort words with accents.

2015-05-05 Thread Aymeric Augustin
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

Re: New function to sort words with accents.

2015-05-05 Thread Michael Manfre
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

Re: New function to sort words with accents.

2015-05-05 Thread Stephen J. Butler
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

New function to sort words with accents.

2015-05-05 Thread Paulo Maciel
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