class Questions(models.Model):
question = models.CharField(max_length=350)
class AnswerOptions(models.Model):
answer = models.CharField(max_length=150)
yesorno = models.BooleanField(default=False)
question = models.ForeignKey('Questions',
on_delete=models.CASCADE)
I am new to django and would appreciate any suggestions. I really hope for help. How in my case to implement validation in the admin panel? it is necessary to prohibit marking all answers as incorrect and all answers as correct. here the BooleanField field is responsible for this. in the admin.py model, the connection is implemented through “inline”.