title: Automatic creation date for Django model form objects
body: <p>What's the best way to set a creation date for an object automatically, and also a field that will record when the object was last updated?</p>
  
  <p><strong>models.py:</strong></p>
  
  <pre><code>created_at = models.DateTimeField(False, True, editable=False)
  updated_at = models.DateTimeField(True, True, editable=False)
  </code></pre>
  
  <p><strong>views.py:</strong></p>
  
  <pre><code>if request.method == 'POST':
      form = MyForm(request.POST)
      if form.is_valid():
          obj = form.save(commit=False)
          obj.user = request.user
          obj.save()
          return HttpResponseRedirect('obj_list')
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>objects_object.created_at may not be NULL
  </code></pre>
  
  <p>Do I have to manually set this value myself? I thought that was the point of the parameters passed to <code>DateTimeField</code> (or are they just defaults, and since I've set <code>editable=False</code> they don't get displayed on the form, hence don't get submitted in the request, and therefore don't get put into the form?).</p>
  
  <p>What's the best way of doing this? An <code>__init__</code> method?</p>