Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)


This is the approach I'd like to see; I'll be proposing it for addition in Django 1.5.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: