title: Can a model manager access its models' Meta attribute (`Meta.unique_together`)?
body: <p>Here's my attempt at a generalized natural key model manager. It's like <a href="https://docs.djangoproject.com/en/1.2/topics/serialization/#deserialization-of-natural-keys" rel="noreferrer">the docs</a> except it tries (unsuccessfully) to determine the natural key field names from the Meta.unique_together attribute.</p>
  
  <pre><code>class NaturalKeyModelManager(Manager):
  
      def get_by_natural_key(self, *args):
          field_dict = {}
          for i, k in enumerate(self.model.Meta.unique_together[0]):
              field_dict[k] = args[i]
          return self.get(**field_dict)
  </code></pre>
  
  <p>If I insert a debug print just before the for loop like this:</p>
  
  <pre><code>print dir(self.model.Meta)
  </code></pre>
  
  <p>it doesn't list the unqiue_together attribute at all:</p>
  
  <pre><code>['__doc__', '__module__', 'abstract']
  </code></pre>
  
  <p>The 'abstract' bit worried me, but another debug print shows that the model I'm trying manage with natural keys is not abstract:</p>
  
  <pre><code>&gt;&gt;&gt; print self.model.Meta.abstract
  False
  </code></pre>
  
  <p>I am mixing in a lot of abstract base classes. Could that be the problem?</p>
  
  <pre><code>class MixedModel(NamedModel, TimeStampedModel, VersionedModel, Model):
      objects = NaturalKeyModelManager()
  
      class Meta:
          unique_together = (('name', 'version',),)
  </code></pre>
  
  <p>For completeness here's one of the mixins:</p>
  
  <pre><code>class TimeStampedModel(Model):
      created = DateTimeField(_("Created"),     auto_now_add=True, null=True, editable=False)
      updated = DateTimeField(_("Updated"),     auto_now=True,     null=True, editable=True)
  
      class Meta:
          abstract = True
  </code></pre>
  
  <p>The hard-coded model manager works just fine:</p>
  
  <pre><code>class MixedModelManager(Manager):
      def get_by_natural_key(self, name, version):
          return self.get(name=name, version=version)
  </code></pre>