Commit ac595106 authored by Samarth Joshi's avatar Samarth Joshi

Ignoring first line of csv input

parent 51032c7c
......@@ -225,10 +225,12 @@ def handle_uploaded_file(f,q1):
destination.write(chunk)
destination=open("name.csv","r")
rows=readCSV(destination)
count = 0
for row in rows:
if count > 0:
q=Questions(question=row[0],option1=row[1],option2=row[2],option3=row[3],option4=row[4],answer=row[5],type=row[6],marks=int(row[7]),negative=float(row[8]),explainations=row[9],quizCode=q1.quizCode,quizId=q1)#hardcoded quizid
q.save()
count += 1
@login_required
def create_quiz(request):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment