Q:

Django Inserting data (Getting correct data)

I have this code in my html
<form method="post" id="DogForm" action="/studentbehavior/"  class="myform" style="width: 100%" enctype="multipart/form-data">{% csrf_token %}
    <table class="tblcore">
    <input type="hidden" value="{{teacher}}" name="teacher">
        <tr>
            <td rowspan="2" colspan="2">Core Values</td>
            {% for core in corevalues %}
                <td colspan="8"><input type="hidden" value="{{core.id}}" name="core">{{core.Description}}</td>
            {% endfor %}
        </tr>
        <tr>
            {% for corevalues in corevaluesperiod %}
                <td colspan="4" style="font-size: 12px"><input type="hidden" value="{{corevalues.id}}" name="coredescription">{{corevalues.Description}}</td>
            {% endfor %}
        </tr>
        <tr>
            <td colspan="2">Student's Name</td>
            {% for corevalues in period %}
            <td colspan="4">
                <input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
            </td>
                        <td colspan="4">
                <input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
            </td>
                        <td colspan="4">
                <input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
            </td>
                        <td colspan="4">
                <input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
            </td>
                        <td colspan="4">
                <input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
            </td>
                        <td colspan="4">
                <input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
            </td>
                        <td colspan="4">
                <input type="hidden" value="{{corevalues.id}}" name="coreperiod">Q {{corevalues.id}}
            </td>
        {% endfor %}
        </tr>
        {% for students in student %}
        <tr>
            <td colspan="2" class="names"><input type="hidden" value="{{students.id}}" name="student">{{students.Students_Enrollment_Records.Students_Enrollment_Records.Students_Enrollment_Records.Student_Users}}</td>
            <td colspan="4">
                <select name="marking">
                    <option>--------</option>
                    {% for m in marking %}
                        <option value="{{m.Marking}}" >{{m.Marking}}</option>
                    {% endfor %}
                </select>
            </td>
            <td colspan="4">
                <select  name="marking">
                    <option  >--------</option>
                    {% for m in marking %}
                        <option value="{{m.Marking}}">{{m.Marking}}</option>
                    {% endfor %}
                </select>
            </td>
            <td colspan="4">
                <select  name="marking">
                    <option>--------</option>
                    {% for m in marking %}
                        <option value="{{m.Marking}}">{{m.Marking}}</option>
                    {% endfor %}
                </select>
            </td>
            <td colspan="4">
                <select  name="marking">
                    <option>--------</option>
                    {% for m in marking %}
                        <option value="{{m.Marking}}">{{m.Marking}}</option>
                    {% endfor %}
                </select>
            </td>
            <td colspan="4">
                <select name="marking">
                    <option>--------</option>
                    {% for m in marking %}
                        <option value="{{m.Marking}}">{{m.Marking}}</option>
                    {% endfor %}
                </select>
            </td>
            <td colspan="4">
                <select name="marking">
                    <option>--------</option>
                    {% for m in marking %}
                        <option value="{{m.Marking}}">{{m.Marking}}</option>
                    {% endfor %}
                </select>
            </td>
            <td colspan="4">
                <select name="marking">
                    <option>--------</option>
                    {% for m in marking %}
                        <option value="{{m.Marking}}">{{m.Marking}}</option>
                    {% endfor %}
                </select>
            </td>
        </tr>
        {% endfor %}
    </table>
    <input type="submit" value="Insert" id="submit">
</form>

this is what its looks like in web view

this is my code in my views where the data inserted
def studentbehavior(request):
    id = request.POST.get('teacher')
    teacher = EmployeeUser(id=id)

    coreid = request.POST.get('core')
    core = CoreValues(id=coreid)

    corevalues = []
    for corevaluesid in request.POST.getlist('coredescription'):
        corevalues.append(corevaluesid)

    coreperiodID = request.POST.get('coreperiod')
    coreperiod = gradingPeriod(id = coreperiodID)

    marking = []
    for markingID in request.POST.getlist('marking'):
        marking.append(markingID)
        print(marking.append(markingID))
    for m in request.POST.getlist('marking'):
        for student in request.POST.getlist('student'):
            students = StudentPeriodSummary(id=student)
        #s = marking[m]
            for desc in request.POST.getlist('coredescription'):
                coredescription = CoreValuesDescription(id=desc)
                V_insert_data = StudentsCoreValuesDescription(
                    Teacher=teacher,
                    Core_Values=coredescription,
                    Marking=m,
                    Students_Enrollment_Records=students,
                    grading_Period=coreperiod,
                )
                V_insert_data.save()
        return render(request, "Homepage/updatebehavior.html")

this my problem, all markings saved to the datavase even if I select only one in the selection box, (in admin view), looks like the data entering in the database is incorrect.

this is my desire answer

UPDATE
WHEN I try the answer of mr@Saisiva A
for m, student, desc in zip(request.POST.getlist('marking'), request.POST.getlist('student'),
                             request.POST.getlist('coredescription')):
    coredescription = CoreValuesDescription(id=desc)
    students = StudentPeriodSummary(id=student)
    V_insert_data = StudentsCoreValuesDescription(
        Teacher=teacher,
        Core_Values=coredescription,
        Marking=m,
        Students_Enrollment_Records=students,
        grading_Period=coreperiod,
    )
    V_insert_data.save()

this is the data i inputted

this is the result i received in my admin site

Update
I am selecting a mark for every student and every core value then sending all data back to the server
If i want to input like this

the result inserted in my database is like this

UPDATE AGAIN when i try to add this to my views
for markingID in request.POST.getlist('marking'):
    marking.append(markingID)

print(marking[m])

the error says 
list indices must be integers or slices, not str

A:

try this
    marking = []
    for markingID in request.POST.getlist('Marking'):
        marking.append(markingID)

    for i, mark in enumerate(request.POST.getlist('Marking')):
        s = StudentBehaviorMarking(id=mark)
        core = corevalues[i]
        cores = EducationLevelGradingBehavior(id=core)
        print("mark", mark, "per description", core)
        for student in request.POST.getlist('student'):
            students = StudentPeriodSummary(id=student)
            V_insert_data = StudentsBehaviorGrades(
                Teacher=teacher,
                # Education_Levels
                Students_Enrollment_Records=students,
                Grading_Period=coreperiod,
                Grading_Behavior=cores,
                Marking=s,
            )
            V_insert_data.save()

