Re: first() and last(), earliest() and latest()

2013-05-15 Thread Selwin Ong
I've updated the first() and last() to not accept any arguments. Please review it and let me know if there's anything else I need to change. Hopefully this can get merged in during the sprints and make it into 1.6 :). The pull request is here: https://github.com/django/django/pull/1056 Best,

Re: first() and last(), earliest() and latest()

2013-05-11 Thread Selwin Ong
rdering. "There should be one-- and preferably only one --obvious way to do it". Thoughts? The new pull request is here: https://github.com/django/django/pull/1056 Best, Selwin On Sunday, May 12, 2013 4:23:33 AM UTC+7, Shai Berger wrote: > > Hi Selwin, > > On Saturday 11 May

Re: first() and last(), earliest() and latest()

2013-05-11 Thread Selwin Ong
Hi everyone, I submitted a pull request implementing "first()" and "last()" here: https://github.com/django/django/pull/1054 Comments welcome! Best, Selwin On Thursday, February 28, 2013 5:34:16 AM UTC+7, Wim Feijen wrote: > > Hi all, > > We struggled to get a proper definition for a first()

Re: first() and last(), earliest() and latest()

2013-03-04 Thread Selwin Ong
+1 for the first syntax too :) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send

Re: A.objects.getdefault

2013-01-26 Thread Selwin Ong
ding > that Anssi! > > Looking forward to other input, > > Best regards, > > Wim > > > On Sunday, 20 January 2013 12:18:22 UTC+1, Selwin Ong wrote: >> >> Hi Anssi, >> >> Shouldn't first() and last() raise an exception if no ordering is >> specified

Re: A.objects.getdefault

2013-01-20 Thread Selwin Ong
Hi Anssi, Shouldn't first() and last() raise an exception if no ordering is specified? This keeps it consistent with latest() which requires the user to explicitly specify what field it wants to use as ordering. Also, like you mentioned, IMHO these APIs are too similar (first, earliest, last