Commit d7ef1423 authored by Michael Lopez's avatar Michael Lopez

Added an html file (announcement_board.html) and populated it with information...

Added an html file (announcement_board.html) and populated it with information from the models to provide output
parent 4f3aa909
......@@ -23,7 +23,6 @@ class Reaction(models.Model):
name = models.CharField(
max_length=5,
choices=namechoices,
default=LIKE
)
tally = models.IntegerField()
......
<p>Widget's Announcement Board</p>
<p>Announcements:</p>
{% for announcement in announcements %}
<p>
{{ announcements.title }} by {{ announcements.author }} published {{
announcements.pub_datetime }}<br />
{{ announcements.body }}<br />
Like: {{ announcements.tally }}<br />
Love: {{ announcements.tally }}<br />
Angry: {{ announcements.tally }}
</p>
{% endfor %}
......@@ -2,8 +2,8 @@ from django.shortcuts import render
from .models import Announcement, Reaction
def pageview(request):
announcement = Announcement.objects.all()
reaction = Reaction.objects.all()
announcements = Announcement.objects.all()
reactions = Reaction.objects.all()
return render(request, 'announcements/announcement_board.html',
{'departments': announcement, 'widgetusers': reaction})
{'announcements': announcements, 'reactions': reactions})
<p>Widget's Calendar of Activities<br><br></p>
<p>Widget's Calendar of Activities<br /><br /></p>
{% for event in events %}
<p>
Date and Time: {{ event.target_datetime }}<br>
Activity: {{ event.activity }}<br>
Estimated Hours: {{ event.estimated_hours }}<br>
Course/Section: {{ event.course }}<br>
Mode: {{ event.location.mode }}<br>
Venue: {{ event.location.venue }}
</p>
<p>
{{ event.target_datetime }}<br />
Activity: {{ event.activity }}<br />
Estimated Hours: {{ event.estimated_hours }}<br />
Course/Section: {{ event.course }}<br />
Mode: {{ event.location.mode }}<br />
Venue: {{ event.location.venue }}
</p>
{% endfor %}
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