Commit 70e2b199 authored by Titia de Castro's avatar Titia de Castro

extend base template for announcement templates

parent 5076b6af
<!DOCTYPE html> {% extends 'base.html' %}
<html lang="en"> {% load static %}
<head>
<meta charset="UTF-8"> {% block title %}Announcements{% endblock %}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> {% block styles %}
<title>Document</title> <link rel="stylesheet" href="{% static 'css/styles.css' %}">
</head> {% endblock %}
<body>
<h1>{{ announcement.announcement_title }}</h1> {% block content %}
<h2>by {{ announcement.author.first_name }} {{ announcement.author.last_name }} dated {{ announcement.pub_date|date:'d/m/Y' }}</h2> <h1>{{ announcement.announcement_title }}</h1>
<p> <h2>by {{ announcement.author.first_name }} {{ announcement.author.last_name }} dated {{ announcement.pub_date|date:'d/m/Y' }}</h2>
<p>
{{ announcement.announcement_body }} {{ announcement.announcement_body }}
</p> </p>
{% for reaction in announcement.reactions.all %} {% for reaction in announcement.reactions.all %}
<p>{{ reaction.reaction_name }} Reactions: {{ reaction.getTally }}</p> <p>{{ reaction.reaction_name }} Reactions: {{ reaction.getTally }}</p>
{% endfor %} {% endfor %}
</body> {% endblock %}
</html> \ No newline at end of file
\ No newline at end of file
<html lang="en"> {% extends 'base.html' %}
<head> {% load static %}
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> {% block title %}Announcements{% endblock %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Announcements</title> {% block styles %}
</head> <link rel="stylesheet" href="{% static 'css/styles.css' %}">
<body> {% endblock %}
<h1>Announcement Board</h1>
<h2>Important Announcements:</h2> {% block content %}
<ul> <h1>Announcement Board</h1>
<h2>Important Announcements:</h2>
<ul>
{% for announcement in announcements %} {% for announcement in announcements %}
<li><a href="/announcements/{{ announcement.id }}/details">{{ announcement.announcement_title }} by {{ announcement.author.first_name }} {{ announcement.author.last_name }} dated {{ announcement.pub_date|date:'d/m/Y' }}</a></li> <li>
<a href="/announcements/{{ announcement.id }}/details">
{{ announcement.announcement_title }} by {{ announcement.author.first_name }} {{ announcement.author.last_name }}
dated {{ announcement.pub_date|date:'d/m/Y' }}
</a>
</li>
{% endfor %} {% endfor %}
</ul> </ul>
</body> {% endblock %}
</html> \ No newline at end of file
\ No newline at end of file
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