title: django set user object as field value on form submit
body: <p>My model has a required foreign key to the Users model. On the form submit I'd like to save the logged in user as the submitter.</p>
  
  <p>In my view:</p>
  
  <pre><code>def myview(request):
    if request.method == 'POST':
      form = MyForm(request.POST)
      myuser = User.objects.get(id=request.user.id)
      form.submitter_field = myuser
      if form.is_valid()
        #this prints a failed message saying submitter_field is required
  </code></pre>