Meta: ordering randomly within groups
|Reported by:||anonymous||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.4|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I'd like to do this on my model:
ordering = ['?tutor', 'title']
Indicating that results should be grouped by tutor, then sorted by title, but where the ordering of tutors should be random. I realise this is quite low priority and can probably be achieved in other ways, but is seems overkill to have to override the objects Manager class to achieve it.