title: Django Set Form Field Value In Post Request
body: <p>I am trying to set a form field value in views.py inside the Post request using data from request.session and then save that data to the db. However, I am having trouble figuring out how to do that. Here is what I've tried:</p>
  
  <pre><code>    if self.form.is_valid():
          #attempt 1
          request.POST._mutable = True
          self.form.data['field'] = request.session['key']
  
          #attempt 2
          self.form.fields['field'] = request.session['key']
  
          #attempt 3
          self.form.cleaned_data['field'] = request.session['key']
  
          self.object = self.form.save()
  </code></pre>
  
  <p>Is there a way to do this?</p>