On 03/26/2014 10:46 AM, Russell Keith-Magee wrote:
Isn't this already possible by defining a custom queryset? And even
easier in 1.7 with the introduction of .as_manager()?
The only thing the custom Queryset approach doesn't allow is to monkey
patch the get_or_none method into *all* managers by default - but
frankly, I see that as a good thing.
Yeah, this should be possible.
I was thinking of solving the problem when one has two different base
classes for a model. Creating automatically a queryset + manager for the
model could be a nice addition. Something like using GIS + django-mptt
simultaneously for a model, and then both of those automatically adding
their queryset methods to the model's queryset. But, maybe this problem
isn't worth solving (or more accurately, it is better solved explicitly
by the user by providing a custom queryset inheriting from both
GeoQuerySet and MPTTQuerySet).
- 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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/53329873.7010602%40thl.fi.
For more options, visit https://groups.google.com/d/optout.