On 10 tammi, 09:27, Wim Feijen <wimfei...@gmail.com> wrote: > Hi, > > Ticket 19326 has been marked as ready for check-in for some time. Can > some-one have a look at it? > > https://code.djangoproject.com/ticket/19326 > > Thanks, > > Wim
I did some more polish to the patch. There is now also .last() method, and if there is no ordering in the queryset, then it will be automatically ordered by the primary key. I didn't commit the patch yet, as I wonder if there will be confusion about .latest(by_field), .last(filter_args). earliest(by_field) and .first(filter_args)? Currently, the usage is this: a = Article.objects.order_by('headline').first(pub_date__year=2005) which will return first article by headline if any found or None if no match. .last() will just change the ordering by first calling .reverse() on the qs. The patch is 100% ready for commit as far as I am concerned (cursory check of the changes doesn't hurt, of course). So, if one of the BDFLs sees the API as fine just go and commit the patch. Patch available from https://github.com/akaariai/django/compare/ticket_19326. - Anssi -- 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.