Hi Shai,
We can add args and kwargs later when it's actually needed, it's not needed
right now and it' cleaner, I think.
As for "only=True", these methods are meant to replace "latest()". If someone
ones to ensure that the queryset returns only one object, I dont think
"Queryset.get()" is goi
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,
S
er_by" for ordering. "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,
>
>
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()
+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 e
p it like it is and order by id. Thanks for adding
> 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 las
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 a