I am newbie in Django and wanted to know a basic thing:
I have 2 model :
class QuizCat(models.Model):
cid = models.IntegerField()
c_name = models.CharField(max_length=200)
class Quiz(models.Model):
Qid = models.IntegerField()
cat_id = models.ForeignKey(QuizCat, on_delete=models.CASCADE)
name = models.CharField(max_length=200)
I want to insert data in database using 1 csv file such that data gets inserted in both QuizCat model and Quiz model. also what should be the structure of csv file ?