Commit 273425e9 authored by MJoshBen's avatar MJoshBen

Populated the 10 required Data and Fixed Announcement Details Tally Counting

parent d93774ec
from django.db import models from django.db import models
from dashboard.models import WidgetUser
from django.urls import reverse from django.urls import reverse
# Create your models here. # Create your models here.
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
<h3> {{ announcement.pub_datetime }}</h3> <h3> {{ announcement.pub_datetime }}</h3>
<h3> {{ announcement.body }}<br> <h3> {{ announcement.body }}<br>
{{ reaction.name }}: {{ reaction.tally }}<br> {% for reaction in announcement.reaction_set.all %}
{{ reaction.name }}: {{ reaction.tally }}<br> {{ reaction.name }}: {{ reaction.tally }}<br>
{{ reaction.name }}: {{ reaction.tally }}<br> {% endfor %}
</h3> </h3>
{% endblock %} {% endblock %}
{% block scripts %} {% block scripts %}
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
{% block content %} {% block content %}
<h1>Welcome to Widget's Announcement Board!</h1> <h1>Welcome to Widget's Announcement Board!</h1>
<h3> <h3>
{% for announcement in announcements %} {% for announcement in announcement %}
<a href="{{ announcement.get_absolute_url }}">{{ announcement.name }}</a><br> <a href="{{ announcement.get_absolute_url }}">{{ announcement.title }} by {{ announcement.author }}</a><br>
{% endfor %} {% endfor %}
</h3> </h3>
{% endblock %} {% endblock %}
......
No preview for this file type
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