On Tuesday, July 23, 2013 12:39:13 PM UTC+3, Loic Bistuer wrote:
>
> I thought of a third option that I think strikes the right balance between 
> convenience and flexibility. 
>
> Please see the following comment: 
>
> https://github.com/django/django/pull/1328#issuecomment-21400832 
>
>
I will go with the above mentioned approach.

This means that there will be MyQuerySet.as_manager() method. The method is 
just a convenience shortcut for Manager.from_queryset(MyQuerySet)().

If I understand correctly the need for .as_manager() is the only issue 
which is still under discussion. There were two core -0, one +1 (me). There 
were other core members who have reviewed the patch but didn't raise any 
opinion on the .as_manager() method.

Strongest opposition was about the coupling of QuerySet to Manager. The 
current form of .as_manager() doesn't have any strong coupling, and is very 
unlikely to cause maintenance problems. The method is two lines long, and 
those are simple lines. So I feel this is mainly an API issue now.

The .as_manager() could be added separately later on after further 
discussion, but this means a fair bit of extra work (rewrite of the docs & 
tests of the current patch, then a new rewrite for the .as_manager() 
patch), so lets avoid that if possible.

I don't feel that strongly about the method. My gut feeling is that it will 
be convenient. If I get a -1 from somebody, then the method will be gone, 
no questions asked. If I don't get any -1 I will commit the patch on 
Friday. If somebody wants more time to review the patch, just ask and I 
will defer the commit to later date.

 - Anssi

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to