示例#1
0
文件: views.py 项目: saditahmid/spm
def mapping(request):
    if request.method == 'POST':
        course_id = request.POST.get('course-id')
        coMaps = request.POST.getlist('coMaps')
        
        course = Course_T(course_id, program_id='BSc', noOfCredits=3)
        course.save()
        
        for i in range(len(coMaps)):
            co = CO_T(coNo=i + 1, course_id=course_id, plo_id=coMaps[i])
            co.save()
    
        
    return redirect('dataentry')
示例#2
0
                 department_id='CSE')
prog.save()

# Faculty

faculty = Faculty_T(facultyID='1234',
                    fname='Mahady',
                    lname='Hasan',
                    department_id='CSE',
                    gender='h')
faculty.save()

# Course

for i in datalist:
    course = Course_T(courseID=i[1], program_id='BSc', noOfCredits=3)
    course.save()

# Sections
sections = []
for i in datalist:
    if i[2] not in sections:
        sections.append(i[2])

for i in sections:
    section = Section_T(sectionNo=i, course_id='CSE303', faculty_id='1234')
    section.save()

# Student

student = Student_T(studentID='1820750',
示例#3
0
yearNo = '2019'
# Faculty
facultyIDNum = '1236'
faculty = Faculty_T(facultyID=facultyIDNum,
                    fname='Habib',
                    lname='Muzaffar',
                    department_id='CSE',
                    gender='f')
faculty.save()

# Course

# for i in datalist:
#     course = Course_T(courseID=i[1], program_id='BSc', noOfCredits=3)
#     course.save()
course = Course_T(courseNameAll, program_id='BSc', noOfCredits=3)
course.save()

# Sections
sections = []
for i in datalist:
    if i[2] not in sections:
        sections.append(i[2])

for i in sections:
    section = Section_T(sectionNo=i,
                        course_id=courseNameAll,
                        faculty_id=facultyIDNum)
    section.save()

# Student
示例#4
0
# prog = Program_T(programID='BSc', programName='Bachelor of Science', department_id='CSE')
# prog.save()


# Faculty

faculty = Faculty_T(facultyID='4321', fname='Asif', lname='Khaled', department_id='CSE', gender='m')
faculty.save()


# Course

# for i in datalist:
#     course = Course_T(courseID=i[1], program_id='BSc', noOfCredits=3)
#     course.save()
course = Course_T('CSE101', program_id='BSc', noOfCredits=3)
course.save()


# Sections
sections = []
for i in datalist:
    if i[2] not in sections:
        sections.append(i[2])

for i in sections:
    section = Section_T(sectionNo=i, course_id='CSE101', faculty_id='4321')
    section.save()


# Student