I've submitted a patch[1] which makes the "random" template filter accept QuerySet and adds a "shuffle" filter which also works on both lists and QuerySet.
I think it would make sense that the random filter accept QuerySet instances since most of the time when working in templates we are dealing with QuerySets rather than simple lists. This makes the current random implementation not quite useful.. The shuffle filter is also pretty useful and doesn't add much code to the code base. Both proposal persever backward compatibility, I would like some feedback on this idea. Thanks [1] https://code.djangoproject.com/ticket/16647 -- 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.