title: In Django, can you add a method to querysets?
body: <p>In Django, if I have a model class, e.g.</p>
  
  <pre><code>from django.db import models
  
  class Transaction(models.Model):
      ...
  </code></pre>
  
  <p>then if I want to add methods to the model, to store e.g. reasonably complex filters, I can add a custom model manager, e.g. </p>
  
  <pre><code>class TransactionManager(models.Manager):
  
      def reasonably_complex_filter(self):
          return self.get_query_set().filter(...)
  
  
  class Transaction(models.Model):
      objects = TransactionManager()
  </code></pre>
  
  <p>And then I can do:</p>
  
  <pre><code>&gt;&gt;&gt; Transaction.objects.reasonably_complex_filter()
  </code></pre>
  
  <p>Is there any way I can add a custom method that can be chained to the end of a query set from the model?</p>
  
  <p>i.e. add the custom method in such a way that I can do this:</p>
  
  <pre><code>&gt;&gt;&gt; Transaction.objects.filter(...).reasonably_complex_filter()
  </code></pre>