[Django]-How do i link a field to a multi valued field in django model

3👍

It seems you will need to create another model, maybe called result.

class Result(models.Model):
    profile = models.Foreignkey(Profile, on_delete=models.CASCADE)
    quiz = models.Foregnkey(Quiz, on_delete=models.CASCADE)
    score = models.IntegerField()

This relation should allow you to fulfil your requirements.

Leave a comment