Re: Feature request: Unicode collation algorithm in django

2012-02-02 Thread Anssi Kääriäinen
On Feb 2, 10:07 am, Łukasz Rekucki wrote: > Just came to my mind, that we could just mimic the DBs and have a > Collate operator (like Q, F, Count, etc.) + maybe some defaults on the > model: > > M.objects.order_by(Collate("name", "uca")) > M.objects.filter(name__gte=Collate('e', "fi")) I have be

Re: Feature request: Unicode collation algorithm in django

2012-02-02 Thread Łukasz Rekucki
2012/2/2 Łukasz Rekucki : > On 2 February 2012 03:34, Anssi Kääriäinen wrote: >> >> Now, my proposed solution would be to have some way of doing: >> SELECT name, ... >> FROM authors >> ORDER BY name collate 'fi'; >> >> That some way might be something like >> .order_by('name', collate='fi') >> or

Re: Feature request: Unicode collation algorithm in django

2012-02-02 Thread Łukasz Rekucki
On 2 February 2012 03:34, Anssi Kääriäinen wrote: > > Now, my proposed solution would be to have some way of doing: > SELECT name, ... > FROM authors > ORDER BY name collate 'fi'; > > That some way might be something like > .order_by('name', collate='fi') > or maybe > .collate('fi').order_by('name

Re: Feature request: Unicode collation algorithm in django

2012-02-01 Thread Anssi Kääriäinen
On Feb 2, 2:15 am, Ed Hagen wrote: > £ukasz, Thanks for your comments. > > > Could you describe your current solution in more detail? > > Well, my use of the term "solution" was perhaps a bit generous. First, > I educated my users why this problem was hard to solve. Second, I > picked a single col

Re: Feature request: Unicode collation algorithm in django

2012-02-01 Thread Ed Hagen
Łukasz, Thanks for your comments. > Could you describe your current solution in more detail? Well, my use of the term "solution" was perhaps a bit generous. First, I educated my users why this problem was hard to solve. Second, I picked a single collation that everyone could live with. Third, I

Re: Feature request: Unicode collation algorithm in django

2012-02-01 Thread Łukasz Rekucki
On 1 February 2012 20:27, Ed Hagen wrote: > 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 t

Feature request: Unicode collation algorithm in django

2012-02-01 Thread Ed Hagen
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 differe