Commit c424c56f authored by Agu Syquia's avatar Agu Syquia

Updated models.py

Fixed the Reaction class
parent 1ce7c109
......@@ -11,13 +11,8 @@ class Announcement(models.Model):
return self.title
class Reaction(models.Model):
reaction_choices = [
('Like', 'Like'),
('Love', 'Love'),
('Angry', 'Angry'),
]
name = models.CharField(max_length=100, choices=reaction_choices)
tally = models.IntegerField(default=1)
name = models.CharField(max_length=100)
tally = models.IntegerField(default=0)
announcement = models.ForeignKey(Announcement, on_delete=models.CASCADE)
def __str__(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment