Hi,

Let me preface this request by saying that when it comes to django,
I'm an advanced beginner (so this might be a dumb request).

The motivation for my request involved users of a django-based
database of international scholars who wanted their names sorted
"correctly." I explained that different languages sorted characters
differently, and therefore there was no single correct sort order, but
I promised to see if I could easily implement language-specific
orderings. What I found was that django seems to rely on the database
for this feature:

https://docs.djangoproject.com/en/dev/ref/databases/#collation-settings

which (if I've understood things correctly) makes sense for
performance reasons, but makes it more difficult to change things on
the fly, e.g., to provide language-specific ordering.

Using suggestions on this page:

http://stackoverflow.com/questions/1097908/how-do-i-sort-unicode-strings-alphabetically-in-python

I fixed things well-enough for my present purposes, but I thought it
would be useful to abstract this capability away from the database,
with django itself providing some version of the Unicode collation
algorithm:

http://unicode.org/reports/tr10/

This might hook into django's internationalization and localization
features, and/or be accessible at a lower level, e.g., with a keyword
argument to, or variant of, "order_by".

Rationale: any django developer that needs to display sorted lists to
international users could probably benefit from this feature.

Thanks,

Ed.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to