diff --git a/polls/models.py b/polls/models.py index 1063174..53b2828 100644 --- a/polls/models.py +++ b/polls/models.py @@ -70,6 +70,13 @@ class Task(models.Model): ordering = ["-added"] +MESSAGE_TYPE_CHOICES = ( + (0, 'url'), + (1, 'file'), + (2, 'picture') +) + + class TaskAddition(models.Model): id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) task = models.ForeignKey(Task, on_delete=models.CASCADE) @@ -115,13 +122,6 @@ class Message(models.Model): return self.send_from + ':' + self.send_to -MESSAGE_TYPE_CHOICES = ( - (0, 'url'), - (1, 'file'), - (2, 'picture') -) - - class MessageAddition(models.Model): id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) category = models.IntegerField(