2012/2/2 Łukasz Rekucki <lreku...@gmail.com>: > On 2 February 2012 03:34, Anssi Kääriäinen <anssi.kaariai...@thl.fi> 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') >> and now collate would be in effect for filters (that is, >> name__gte='e'), too. >> > > The user should probably be able to specifiy the collation only for > the fields he wants, as it most likely uses a different type of index > and is more expensive then a standard ordering, so I like the > .collate(name="fi") option (and a shortcut of .collate("fi") to apply > to all text fields.
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")) -- Łukasz Rekucki -- 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.