title: cannot Assign Value , must be an instance django
body: <p>I am getting below error when inserting values through request.post.get method</p>
  <blockquote>
  <p>Cannot assign &quot;'1'&quot;: &quot;Faculty_Feedback.department&quot; must be a &quot;Department&quot; instance.</p>
  </blockquote>
  <p>The model in which i want to insert data is</p>
  <pre><code>class Faculty_Feedback(models.Model):
      department = models.ForeignKey(Department,on_delete=models.CASCADE)
      program    = models.ForeignKey(Program,on_delete=models.CASCADE)
      resp1 = models.IntegerField(default=1)
      resp2 = models.IntegerField(default=1)
      resp3 = models.IntegerField(default=1)
      resp4 = models.IntegerField(default=1)
      resp5 = models.IntegerField(default=1)
      resp6 = models.IntegerField(default=1)
      resp7 = models.IntegerField(default=1)
      resp8 = models.IntegerField(default=1)
      resp9 = models.IntegerField(default=1)
      resp10 = models.IntegerField(default=1)
      resp11 = models.IntegerField(default=1)
      resp12 = models.IntegerField(default=1)
      resp13 = models.IntegerField(default=1)
  </code></pre>
  <p>I am inserting department and program values into template from below code</p>
  <pre><code>departments = Department.objects.all()
      programs= Program.objects.all()
      context = {
          &quot;departments&quot;:departments,
          &quot;programs&quot;:programs
      }
  </code></pre>
  <p>Below is the template code</p>
  <pre><code>&lt;div class=&quot;form-group&quot;&gt;
                  &lt;label for=&quot;text&quot;&gt;Department&lt;/label&gt;
                  &lt;select style=&quot;width: 90%&quot; class=&quot;form-control&quot; name=&quot;department&quot; id=&quot;department&quot;&gt;
                      {% for department in departments%}
                      &lt;option value=&quot;{{department.pk}}&quot;&gt;{{department.dept}}&lt;/option&gt;
                      {% endfor%}
                  &lt;/select&gt;
              &lt;/div&gt;
  
              &lt;div class=&quot;form-group&quot;&gt;
                  &lt;label for=&quot;text&quot;&gt;Program&lt;/label&gt;
                  &lt;select style=&quot;width: 90%&quot; class=&quot;form-control&quot; name=&quot;program&quot; id=&quot;program&quot;&gt;
                      {% for program in programs%}
                      &lt;option value=&quot;{{program.pk}}&quot;&gt;{{program.program}}&lt;/option&gt;
                      {% endfor%}
                  &lt;/select&gt;
              &lt;/div&gt;
  </code></pre>
  <p>I am inserting data of feedback by getting values through request.post.get method</p>
  <pre><code>def feedback(request):
      if request.method == &quot;POST&quot;:
          dept = request.POST.get('department')
          prog = request.POST.get('program')
          q1 = request.POST.get('f1')
          q2 = request.POST.get('f2')
          q3 = request.POST.get('f3')
          q4 = request.POST.get('f4')
          q5 = request.POST.get('f5')
          q6 = request.POST.get('f6')
          q7 = request.POST.get('f7')
          q8 = request.POST.get('f8')
          q9 = request.POST.get('f9')
          q10 = request.POST.get('f10')
          q11 = request.POST.get('f11')
          q12 = request.POST.get('f12')
          q13 = request.POST.get('f13')
          com1 = request.POST.get('com1')
          com2 = request.POST.get('com2')
        
  
          save_feedback = Faculty_Feedback(department = dept , program = prog,resp1=q1, resp2=q2, resp3=q3, resp4=q4,
                                           resp5=q5, resp6=q6, resp7=q7, resp8=q8,
                                           resp9=q9, resp10=q10, resp11=q11, resp12=q12,
                                           resp13=q13)
          save_comments = Faculty_Comments(department = dept,program = prog,comment_1 = com1 , comment_2 = com2)
          save_feedback.save()
          save_comments.save()
  </code></pre>