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