title: Validating Unique Fields in Django
body: <p>I don't know if I'm approaching the problem in the right way. The intended outcome is to have a form that displays only <code>name</code> and <code>description</code>. Once the user submits the form I want to add the current user as <code>owner</code> and check if there's already an entry that has the same <code>name</code> and <code>user</code>. If there is, I want to return the form with errors. If not, I want to save <code>Status</code>.</p>
  
  <p>My model:</p>
  
  <pre><code>class Status(models.Model):
      name = models.CharField(max_length=100)
      description = models.TextField(blank=True)
      owner = models.ForeignKey(User)
      active = models.BooleanField(default=True)
  
      class Meta:
          unique_together = ('name','owner')
  </code></pre>
  
  <p>My View:</p>
  
  <pre><code>def settings_status(request):
      status_form = StatusForm()
  
      if request.method == 'POST':
          status_form = StatusForm(request.POST)
              if status_form.is_valid():
                  new_status = Status()
                  new_status.name = status_form.cleaned_data['name']
                  new_status.description = status_form.cleaned_data['description']
                  new_status.owner = request.user
                  new_status.save()
  
      return render_to_response('base/settings_status.html',{
          'status_form'           :       status_form,
  }, context_instance=RequestContext(request))
  </code></pre>
  
  <p>I have tried numerous things, but I keep running into the problem that if I add <code>owner</code> to the object separately then it isn't available to the model's <code>clean</code> function and therefore can't be used to check if <code>name</code> and <code>owner</code> are unique.</p>