title: How to pre-populate Django ModelForm fields
body: <p>I have the following ModelForm:</p>
  
  <pre><code>class IssueProcessForm(forms.ModelForm):
      def __init__(self, *args, **kwargs):
          super(IssueProcessForm, self).__init__(*args, **kwargs)
  
          self.fields['number'].disabled = True
          self.fields['title'].disabled = True
          self.fields['body'].disabled = True
  
          self.fields['body'].widget = forms.Textarea(
              attrs={
                  'cols': 50
              }
          )
  
      class Meta:
          model = Issue
          fields = (
              'number', 'title', 'body', 'price'
          )
  </code></pre>
  
  <p>I want to pre-populate the fields <code>number</code>, <code>title</code>, and <code>body</code> with data from within a view, render the form, and make sure value corresponding to the fields show while also disabling these fields, so that user won't alter values. I want the <code>price</code> field to be the only thing a user touches and when the save button is clicked, I want everything saved to the database. I tried the following:</p>
  
  <pre><code>def issue_process(request, repo_name, issue_number):
      get_issue_number = request.session.get('issue_number_{}'.format(issue_number))
      get_issue_title = request.session.get('issue_number_{}_title'.format(issue_number))
      get_issue_body = request.session.get('issue_number_{}_body'.format(issue_number))
  
      if request.method == 'POST':
          form = IssueProcessForm(request.POST)
          if form.is_valid():
              issue = form.save(commit=False)
              issue.number = get_issue_number
              issue.title = get_issue_title
              issue.body = get_issue_body
              issue.save()
      else:
          form = IssueProcessForm(initial={
              'number': get_issue_number,
              'title': get_issue_title,
              'body': get_issue_body
          })
      return render(request, 'core/issue_process.html', {'form': form})
  </code></pre>
  
  <p>...but each of the three fields keep saying <code>this field is required</code> when I try submitting. What can I do please? Please note that <code>get_issue_number</code>, <code>get_issue_title</code>, <code>get_issue_body</code> are the values I'd like to pre-populate the fields <code>number</code>, <code>title</code>, and <code>body</code> with, respectively.</p>