title: Override .objects in Model Django outside models.py
body: <p>I want to override Classes in <code>models.py</code> to get call stacks at runtime. </p>
  
  <p>I know that we can do following in Django in order to override manager and hence customize QuerySet API - </p>
  
  <p>So, in <code>models.py</code></p>
  
  <pre><code>class A(models.Model):
        objects = SomeClass()
  </code></pre>
  
  <p>and in <code>SomeClass</code> </p>
  
  <pre><code>class B(Manager):
       def get_query_set(): 
       # override the way you want
  </code></pre>
  
  <p>But, in order to make things simpler I am thinking to use decorator to override the same - So, 
  in <code>models.py</code></p>
  
  <p><code>@ decoratorForOverriding
  class A(models.Model):
      pass</code></p>
  
  <p>in <code>decorator.py</code></p>
  
  <pre><code>def decoratorForOverriding(cls):
   cls.objects = SomeClass()
  </code></pre>
  
  <p>Error I get is </p>
  
  <pre><code>AttributeError: 'NoneType' object has no attribute '_meta'
  </code></pre>
  
  <p>Any idea what is going on?
  Should I make the <code>class A</code> as an abstarct class? That did not do the trick either.</p>