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">
<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>
{{ announcement.announcement_body }}
</p>
{% for reaction in announcement.reactions.all %} {% block title %}Announcements{% endblock %}
<p>{{ reaction.reaction_name }} Reactions: {{ reaction.getTally }}</p>
{% endfor %} {% block styles %}
</body> <link rel="stylesheet" href="{% static 'css/styles.css' %}">
</html> {% endblock %}
\ No newline at end of file
{% 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>
{% for reaction in announcement.reactions.all %}
<p>{{ reaction.reaction_name }} Reactions: {{ reaction.getTally }}</p>
{% endfor %}
{% endblock %}
\ 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>
{% for announcement in announcements %} <h2>Important Announcements:</h2>
<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> <ul>
{% endfor %} {% for announcement in announcements %}
</ul> <li>
</body> <a href="/announcements/{{ announcement.id }}/details">
</html> {{ announcement.announcement_title }} by {{ announcement.author.first_name }} {{ announcement.author.last_name }}
\ No newline at end of file dated {{ announcement.pub_date|date:'d/m/Y' }}
</a>
</li>
{% endfor %}
</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