title: Why does adding this __init__() method break my Django model?
body: <p>This question is a follow-up to one I asked earlier <a href="https://stackoverflow.com/questions/37782083/how-can-i-force-2-fields-in-a-django-model-to-share-the-same-default-value"><strong>here</strong></a>.</p>
  
  <p>I have a Django model as follows:</p>
  
  <pre><code>class MyModel(models.Model):
      my_field1 = models.DateTimeField(default=datetime.utcnow, editable=False)
      my_field2 = models.DateTimeField()
  </code></pre>
  
  <p>It works:</p>
  
  <pre><code>&gt;&gt;&gt; MyModel.objects.all()
  [&lt;MyModel: MyModel object&gt;, &lt;MyModel: MyModel object&gt;,
  </code></pre>
  
  <p>Now I add the following constructor to <code>MyModel</code>:</p>
  
  <pre><code>def __init__(self, **kwargs):
      super(MyModel, self).__init__(**kwargs)
      if self.my_field2 is None:
          self.my_field2 = self.my_field1
  </code></pre>
  
  <p>And that breaks the class:</p>
  
  <pre><code>&gt;&gt;&gt; MyModel.objects.all()
  Traceback (most recent call last):
    File "&lt;console&gt;", line 1, in &lt;module&gt;
    File "MYvirtualenv/lib/python2.7/site-packages/django/db/models/query.py", line 138, in __repr__
      data = list(self[:REPR_OUTPUT_SIZE + 1])
    File "MYvirtualenv/lib/python2.7/site-packages/django/db/models/query.py", line 162, in __iter__
      self._fetch_all()
    File "MYvirtualenv/lib/python2.7/site-packages/django/db/models/query.py", line 965, in _fetch_all
      self._result_cache = list(self.iterator())
    File "MYvirtualenv/src/django-cache-machine-master/caching/base.py", line 118, in __iter__
      obj = iterator.next()
    File "MYvirtualenv/lib/python2.7/site-packages/django/db/models/query.py", line 255, in iterator
      obj = model_cls.from_db(db, init_list, row[model_fields_start:model_fields_end])
    File "MYvirtualenv/lib/python2.7/site-packages/django/db/models/base.py", line 489, in from_db
      new = cls(*values)
  TypeError: __init__() takes exactly 1 argument (2 given)
  </code></pre>
  
  <p>Why does this happen when I add the relatively simple constructor? How should I remedy it? I need the logic in that constructor, so I cannot just eliminate it.</p>