Commit d19069ef authored by Neal Berones's avatar Neal Berones

created templates folder in annnouncements app

parent 7d55a641
...@@ -12,7 +12,13 @@ class Announcement(models.Model): ...@@ -12,7 +12,13 @@ class Announcement(models.Model):
announcement_body = models.CharField(max_length=500) announcement_body = models.CharField(max_length=500)
pub_date = models.DateTimeField("date published") pub_date = models.DateTimeField("date published")
def __str__(self):
return self.announcement_title
class Reaction(models.Model): class Reaction(models.Model):
reaction_name = models.CharField(max_length=10, choices=REACTION_CHOICES, default=Like) reaction_name = models.CharField(max_length=10, choices=REACTION_CHOICES, default=Like)
tally = models.IntegerField(default = 0) tally = models.IntegerField(default = 0)
announcement = models.ForeignKey(Announcement, on_delete = models.CASCADE) announcement = models.ForeignKey(Announcement, on_delete = models.CASCADE)
def __str__(self):
return self.reaction_name
{% extends "base.html" %}
{% block content %}
{% endblock %}
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