Commit 699a22bb authored by Junho Park's avatar Junho Park

fix: populated field

parent 5bd8ffcd
No preview for this file type
No preview for this file type
...@@ -13,15 +13,15 @@ def index(request): ...@@ -13,15 +13,15 @@ def index(request):
a.author.first_name, a.author.first_name,
a.author.last_name, a.author.last_name,
a.pub_date, a.pub_date,
a.announcement_body, a.announcement_body
) )
reaction = Reaction.objects.filter(announcement=a.id) reaction = Reaction.objects.filter(announcement=a.id)
html += "Like: {}<br>Love: {}<br>Angry: {}".format( html += "Like: {}<br>Love: {}<br>Angry: {}".format(
reaction.filter(reaction_name__exact="Like").count, reaction.filter(reaction_name__exact="Like").count(),
reaction.filter(reaction_name__exact="Love").count, reaction.filter(reaction_name__exact="Love").count(),
reaction.filter(reaction_name__exact="Angry").count, reaction.filter(reaction_name__exact="Angry").count()
) )
html += '<br>' html += '<br>'
......
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