change bugs

This commit is contained in:
Ilia 2021-03-20 02:32:12 +03:00
parent e4987f7092
commit a998c3f448
48 changed files with 14 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -87,3 +87,16 @@ class Answer(models.Model):
number = models.IntegerField() number = models.IntegerField()
completed = models.BooleanField(default=False) completed = models.BooleanField(default=False)
score = models.IntegerField(default=0) score = models.IntegerField(default=0)
@receiver(post_save, sender=AnswerSheet)
def createUserAnswers(sender, instance, created, **kwargs):
print(sender, instance)
for task in instance.test.task_set.all():
print(task, instance.test.task_set.all())
Answer.objects.create(sheet=instance, content="", number=task.number)
@receiver(post_save, sender=Answer)
def answerR(sender, instance, **kwargs):
print(instance, instance.sheet, instance.sheet.child)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.