Add the base.html, detail.html and index.html files

parent ad5df383
{% load static %}
<!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">
<link rel="stylesheet" type="text/css" href ={% static 'forum/style.css' %}>
<title>Project Jupert</title>
</head>
<body>
{% block content %}
{% endblock %}
</body>
</html>
\ No newline at end of file
{% extends "forum/base.html" %}
{% block content %}
<h1>{{ posts.post_title }}</h1>
<h3>{{ posts.author.first_name }} {{ posts.author.last_name }}, {{ posts.pub_date|date:"d/m/Y" }}</h3>
<p>
{{ posts.post_body }}
</p>
<p>
{% for reply in reply_list %}
{% if reply.author.last_name == posts.author.last_name %}
<li>{{ reply.author.first_name }} {{ reply.author.last_name }}, {{ reply.pub_date|date:"d/m/Y" }}: {{reply.reply_body}}</li>
{% endif %}
{% endfor %}
</p>
<img src= {{posts.image.url}}>
{% endblock %}
\ No newline at end of file
{% extends "forum/base.html" %}
{% block content %}
<h1>Welcome to Widget's Forum</h1>
<h3>Forum posts:</h2>
{% if post_list %}
<ul>
{% for post in post_list %}
<li><a href = "{% url 'forum:details' post.id %}"> <b>{{ post.post_title }}</b> by {{ post.author.first_name }} {{ post.author.last_name }} dated {{ post.pub_date|date:"d/m/Y" }} </a></li>
{% endfor %}
</ul>
{% else %}
<p>No posts are available.</p>
{% endif %}
{% 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