On Feb 16, 10:10 pm, Aaron Merriam <aaronmerr...@gmail.com> wrote:
> A while back I adopted a new way of extending managers and querysets that
> has been around for quite a while.  It seems to originate from this django
> snippet (http://djangosnippets.org/snippets/734/)

There was a long thread about allowing the use of manager methods
through the queryset [1]. The different ideas and implementations in
that thread should make it possible to extend the queryset without the
need to actually define a queryset subclass at all.

One idea given in that thread was to get rid of the Manager class
altogether. Now that I think of it, it makes sense. The manager isn't
much more than a wrapper to queryset. I think it would make sense to
investigate what it would take to get rid of the Manager.
Unfortunately it is likely it will be impossible to do that in any
clean way without compromising backwards compatibility. But I think it
is worth a shot. Succeeding would give pretty nice opportunities for
chaining "manager" methods, in addition to some DRY.

[1]: RFC: Query Methods:
http://groups.google.com/group/django-developers/browse_thread/thread/ad1af7d783317302/284c052fb4cc169e?#284c052fb4cc169e

 - 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