Re: [Django] #19026: Meta: ordering randomly within groups

2012-09-28 Thread Django
#19026: Meta: ordering randomly within groups
-+-
 Reporter:  anonymous|Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |   Resolution:  wontfix
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by ptone):

 * status:  new => closed
 * needs_docs:   => 0
 * resolution:   => wontfix
 * needs_tests:   => 0
 * needs_better_patch:   => 0


Comment:

 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.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Django] #19026: Meta: ordering randomly within groups

2012-09-25 Thread Django
#19026: Meta: ordering randomly within groups
--+
 Reporter:  anonymous |  Owner:  nobody
 Type:  New feature   | Status:  new
Component:  Database layer (models, ORM)  |Version:  1.4
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 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.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.