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

@ -86,4 +86,17 @@ class Answer(models.Model):
content = models.TextField()
number = models.IntegerField()
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.