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

extend base template for announcement templates

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