title: How to create multiple entries in Django?
body: <p>I am trying to build a grading system. I have a class called <code>Score</code> which lists all the scores of students.</p>
  
  <pre><code>class Score(Base):
      student = models.ForeignKey(Usr, limit_choices_to={'user_type': 'Student'}, related_name='scored')
      subject = models.ForeignKey(Subject)
      teacher = models.ForeignKey(Usr, limit_choices_to={'user_type': 'Teacher'}, related_name='marked')
      exam = models.CharField(max_length=50)
      exam_date = models.DateField()
      score = models.IntegerField()
      out_of = models.IntegerField()
  </code></pre>
  
  <p>The view currently passes two objects, <code>student_list</code> and <code>subject_list</code>, which carries the number of student in a particular class, and the number of subjects that the logged in teacher takes. This will allow him to choose which subject he is marking for that particular group of students.</p>
  
  <pre><code>def Edit(request, pk):
      this_klass = Klass.objects.get(id=pk)
      student_list = this_klass.kara_pore.all()
      subject_list = request.user.teaches.subject.all
      return render(request, "grades/edit.html", {'student_list': student_list, 'subject_list': subject_list})
  </code></pre>
  
  <p>The template displays a table, where the farthest left column has the student list, and then the next column has textfields for submitting their scores. I have named the textfields as the <code>id</code> of the corresponding student, hoping that would help me to reference them while saving the scores.</p>
  
  <pre><code>{% extends "base.html" %}
  
  {% block body %}
  &lt;form method="POST" action="process/"&gt; {%  csrf_token %}
      &lt;select name="sub"&gt;
      {% for subject in subject_list %}
          &lt;option value="{{ subject }}"&gt;{{ subject }}&lt;/option&gt;
      {% endfor %}
      &lt;/select&gt;
  &lt;br/&gt;
      {% for student in student_list %}
          {{ student }}&lt;input type="text" name="{{ student.student_id}}"/&gt; &lt;br/&gt;
      {% endfor %}
  
      &lt;input type="submit" value="Submit"/&gt;
  &lt;/form&gt;
  {% endblock %}
  </code></pre>
  
  <p>I currently have no idea how I can process the entry of the scores and save them in the <code>Score</code> table in reference to specific students. Till now I have only saved one row in Django. More specifically, am I saving the data the wrong way? Do I have to use arrays for this type of problems?</p>