4 ms·
Why not just pass a QuerySet implementation into models.Manager as an optional argument? This would be much cleaner, I think: class QuerySetSubclass(QueryS
by legutierr 14y ago
Why not just pass a QuerySet implementation into models.Manager as an optional argument? This would be much cleaner, I think:
class QuerySetSubclass(QuerySet):
def new_method(self):
pass
class Model(models.Model):
objects = models.Manager(QuerySetSubclass)
- jacobian 14y agoThis is the approach I'd like to see; I'll be proposing it for addition in Django 1.5.