fixed issue where reactions didnt appear in announcements

parent ffbd29c4
......@@ -23,6 +23,8 @@ a {
font-size: 22px;
font-family: "Arial Narrow";
}
img {
display: block;
margin-left: auto;
......
......@@ -6,10 +6,10 @@
<h1>{{ announcement.announcement_title }}</h1>
<h2>by {{ announcement.author }}, {{announcement.pub_date}}</h2>
<p>{{announcement.announcement_body}}</p>
<ul>
{% for reaction in reactionList %}
<li>{{ reaction.reaction_name }}: {{reaction.tally}}</a></li>
{% endfor %}
</ul>
<br /><br /><br /><img src="{{ announcement.images.url }}" alt="{{announcement.announcement_title}}" style="width:50%">
<p><ul>
{% for reaction in reactionList %}
<li>{{ reaction.reaction_name }}: {{reaction.tally}}</li>
{% endfor %}
</ul></p>
{% endblock %}
\ No newline at end of file
......@@ -24,6 +24,6 @@ def details(request, announcement_id):
break
context = {
"announcement": announcement,
"announcement_id": announcement_id
"reactionList": reactionList,
}
return render(request, "announcements/details.html", context)
\ No newline at end of file
......@@ -9,7 +9,7 @@
{% if replies %}
<ul>
{% for reply in replies %}
<li>{{ reply.author }}, {{reply.pub_date}}: {{reply.reply_body}}</a></li>
<li>{{ reply.author }}, {{reply.pub_date}}: {{reply.reply_body}}</li>
{% endfor %}
</ul>
{% else %}
......
......@@ -8,7 +8,7 @@
{% if users %}
<ol>
{% for user in users %}
<li><a href="users/{{ user.id }}/details/">{{ user.last_name }}, {{ user.first_name }} {{ user.middle_name }}</li>
<li><a href="users/{{ user.id }}/details/">{{ user.last_name }}, {{ user.first_name }} {{ user.middle_name }}</a></li>
{% endfor %}
</ol>
{% else %}
......
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