On 29 marras, 01:13, Wim Feijen <wimfei...@gmail.com> wrote:
> Hi, the patch has been updated and now works.
>
> Still, feedback would be appreciated. So, Anssi, Jacob?

Apart of some whitespace errors the patch looks good to me.

There isn't last() method in the patch. Implementing one is going to
be a little more challenging as one needs to change the direction of
all the ordering clauses. Do we want one in the same patch?

A bigger problem might be that we already have .latest() which does
something a bit different. I wonder if having both .last(filter_args)
and .latest(by_field) is going to be confusing.

Another API issue is that should .first() check for some ordering?
This could add some protection. In testing conditions things might
work, but when updates are done to the rows the expected ordering
suddenly changes. One option is to do automatic ordering on PK if
there isn't any other ordering present.

I still like the idea of .get_default() mainly for the added "if
multiple objects returned, then throw an error" protection it gives.
>From implementation/maintenance perspective these are really easy
additions, from API bloat perspective maybe not...

 - 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.

Reply via email to