I know that there are answers regarding Django Rest Framework, but I couldn't find a solution to my problem.

I have the following setup in Django REST Framework:

**models.py:**

```
class Variant(models.Model):
    variant = models.CharField(max_length=30)

class Question(models.Model):
    question = models.CharField(max_length=250)
    multiple = models.BooleanField(default=False)
    variants = models.ForeignKey(Variant, db_index=True, on_delete=models.CASCADE)
    answer = models.CharField(max_length=30)

class Quiz(models.Model):
    name = models.CharField(max_length=250)
    description = models.TextField()
    questions = models.ForeignKey(Question, on_delete=models.CASCADE)
    date_created = models.DateTimeField(auto_now=True, db_index=True)

```

**serializers.py:**

```
class VariantSerializer(serializers.ModelSerializer):
    class Meta:
        model = Variant
        fields = ['id', 'variant']

class QuestionSerializer(serializers.ModelSerializer):
    variants = VariantSerializer(many=True, read_only=True)

    class Meta:
        model = Question
        fields = ['id', 'question', 'multiple', 'variants', 'answer']

    def create(self, validated_data):
        variants_data = validated_data.pop('variants')
        question = Question.objects.create(**validated_data)

        for variant in variants_data:
            Variant.objects.create(question=question, **variant)

        return question

class QuizSerializer(serializers.ModelSerializer):
    questions = QuestionSerializer(many=True)

    class Meta:
        model = Quiz
        fields = ['id', 'name', 'description', 'date_created', 'questions']

    def create(self, validated_data):
        questions_data = validated_data.pop('questions')
        quiz = Quiz.objects.create(**validated_data)

        for question in questions_data:
            Question.objects.create(quiz=quiz, **question)

        return quiz

```

When I try to post some data assigned using a JSON file like this one:

```
{
    "name": "quiz",
    "description": "quiz quiz quiz",
    "questions": [
        {
            "question": "What is the weather today?",
            "multiple": false,
            "variants": [
                {
                    "variant": "cloudy"
                },
                {
                    "variant": "cold"
                }
            ],
            "answer": "cloudy"
        },
        {
            "question": "What is the weather today?",
            "multiple": false,
            "variants": [
                {
                    "variant": "cloudy"
                },
                {
                    "variant": "cold"
                }
            ],
            "answer": "cloudy"
        }
    ] }

```

I get the error `django.db.utils.IntegrityError: NOT NULL constraint failed: api_quiz.questions_id`

I am new to this framework, what can I do to post data?