#19026 closed New feature (wontfix)

Meta: ordering randomly within groups

Reported by: anonymous Owned by: nobody
Component: Database layer (models, ORM) Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I'd like to do this on my model:

class Meta:

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.

Attachments (0)

Change History (1)

comment:1 Changed 19 months ago by ptone

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

Thanks for the suggestion, but there isn't likely to be a sane way to do something like this in the ORM. Managers are actually the perfect thing for defining such a narrow and specific behavior.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.