title: Custom QuerySet and Manager without breaking DRY?
body: <p>I'm trying to find a way to implement both a custom <code>QuerySet</code> and a custom <code>Manager</code> without breaking DRY.  This is what I have so far:</p>
  
  <pre><code>class MyInquiryManager(models.Manager):
      def for_user(self, user):
          return self.get_query_set().filter(
                      Q(assigned_to_user=user) |
                      Q(assigned_to_group__in=user.groups.all())
                  )
  
  class Inquiry(models.Model):   
      ts = models.DateTimeField(auto_now_add=True)
      status = models.ForeignKey(InquiryStatus)
      assigned_to_user = models.ForeignKey(User, blank=True, null=True)
      assigned_to_group = models.ForeignKey(Group, blank=True, null=True)
      objects = MyInquiryManager()
  </code></pre>
  
  <p>This works fine, until I do something like this:</p>
  
  <pre><code>inquiries = Inquiry.objects.filter(status=some_status)
  my_inquiry_count = inquiries.for_user(request.user).count()
  </code></pre>
  
  <p>This promptly breaks everything because the <code>QuerySet</code> doesn't have the same methods as the <code>Manager</code>.  I've tried creating a custom <code>QuerySet</code> class, and implementing it in <code>MyInquiryManager</code>, but I end up replicating all of my method definitions.</p>
  
  <p>I also found <a href="http://adam.gomaa.us/blog/2009/feb/16/subclassing-django-querysets/" rel="noreferrer">this snippet</a> which works, but I need to pass in the extra argument to <code>for_user</code> so it breaks down because it relies heavily on redefining <code>get_query_set</code>.</p>
  
  <p>Is there a way to do this without redefining all of my methods in both the <code>QuerySet</code> and the <code>Manager</code> subclasses?</p>