Commit 899647f4 authored by Ross Batacan's avatar Ross Batacan

Created announcements/edit URL with created template announcements-edit.html....

Created announcements/edit URL with created template announcements-edit.html. Reaction with tally display per announcement not yet implemented
parent ad570874
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
{% extends 'base.html' %}
{% block title %}{{ announcement.announcement_title }}{% endblock %}
{% block content %}
<h1>{{ announcement.announcement_title }}</h1>
<h2> by {{ announcement.announcement_author.first_name }}
{{ announcement.announcement_author.last_name }}
</h2>
{{ announcement.announcement_pub_datetime }} <br>
{{ announcement.announcement_body }}<br>
{{ reaction.reaction_name }}
</body>
</html>
\ No newline at end of file
<a><button>Edit Announcement</button></a>
{% endblock %}
\ No newline at end of file
......@@ -4,7 +4,7 @@
<h1>Welcome to Widget's Announcement Board!</h1>
<h3>Announcements:</h3>
{% for announcement in announcements %}
<a href="{ % url 'announcements:announcement-details' announcement.id % }"> {{ announcement.announcement_title }}
<a href="{% url 'announcements:announcement-details' announcement.id %}"> {{ announcement.announcement_title }}
by {{ announcement.announcement_author.first_name }} {{ announcement.announcement_author.last_name }}
</a> <br>
{% endfor %} <br>
......
......@@ -23,7 +23,6 @@ class AnnouncementsDetailsView(DetailView):
class AnnouncementsCreateView(CreateView):
model = Announcement
fields = 'announcement_title', 'announcement_body', 'announcement_author'
template_name = 'announcements/announcement-add.html'
class AnnouncementsEditView(UpdateView):
......
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