title: Django Migrations Add Field with Default as Function of Model
body: <p>I added a new, non-nullable field to my Django model and am trying to use migrations to deploy that change. How would I set default value to use for existing models to be some function of those models rather than a constant?</p>
  <p>As an example let's say I previously had a <code>created_on</code> field and I just added an <code>updated_on</code> field whose value I want to set initially to the model's <code>created_on</code>. How would I do this in a migration?</p>
  <p>This is what I am trying to start with:</p>
  <pre><code>migrations.AddField(
      model_name='series',
      name='updated_as',
      field=models.DateTimeField(default=????, auto_now=True),
      preserve_default=False,
  ),
  </code></pre>