title: Composite Field Syntax for django
body: <p>I am using django(1.9)-python(2.7) for my project where my models are created from legacy db (Oracle) using inspectdb. The problem here is the legacy db has composite primary keys.</p>
  
  <p>My approach to the problem in question was usage of Composite fields <a href="http://django-composite-field.readthedocs.io/en/latest/" rel="nofollow">http://django-composite-field.readthedocs.io/en/latest/</a></p>
  
  <pre><code>from composite_field import CompositeField
  
  class Thing(models.Model):
      first = models.CharField(max_length=32)
      second = models.IntegerField()
      both = CompositeField(('first', 'second'))
  </code></pre>
  
  <p>But I end up in the following error
  ...</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;console&gt;", line 1, in &lt;module&gt;
    File "&lt;console&gt;", line 4, in Thing
    File "C:\Python27\Lib\site-packages\composite_field\base.py", line 70, in __in
  it__
      self.subfields = deepcopy(self.subfields)
  AttributeError: 'CompositeField' object has no attribute 'subfields'
  </code></pre>
  
  <p>Thanks in advance!!</p>