This commit is contained in:
Cja committed 2025-01-20 09:59:44 +03:00
1 parent 7cfda0b1f2
commit c1c3615da0
2 files changed
+31 -11

No files matched your search

+2 -2
View File
@@ -19,7 +19,7 @@ class Vote(models.Model):
verbose_name_plural = "Голосования"
class Question(models.Model):
question = models.CharField(max_length=255)
name = models.CharField(max_length=255)
vote = models.ForeignKey(Vote, related_name='questions', on_delete=models.CASCADE)
file = models.ImageField(upload_to='question_images/', null=True, blank=True)
numb = models.PositiveIntegerField()
@@ -33,7 +33,7 @@ class Question(models.Model):
verbose_name_plural = "Вопросы"
class Answer(models.Model):
answer = models.CharField(max_length=255)
name = models.CharField(max_length=255)
file = models.FileField(upload_to='answer_files/', null=True, blank=True)
question = models.ForeignKey(Question, related_name='answers', on_delete=models.CASCADE)