{% extends "forum/base.html" %}

{% block content %}
{% if forum.thread_set.all %}
    <ul>
    {% for thread in forum.thread_set.all %}
        <li><a href="{% url 'thread' thread.id %}">{{ thread }}</a>
    {% endfor %}
    </ul>
{% else %}
    <p>No threads in a forum.
{% endif %}
{% endblock %}

{% extends "forum/base.html" %}

{% block content %}
{% if forum.thread_set.all %}
    <table border=1>
    <tr>
    <th> Title
    <th> Started by
    <th> Replies
    <th> Views
    <th> Last post
    {% for thread in forum.thread_set.all %}
        <tr>
        <td><a href="{% url 'thread' thread.id %}">{{ thread }}</a>
        <td>{{ thread.author }}
        <td>{{ thread.replies }}
        <td>{{ thread.views }}
        <td>{{ thread.last_post.author }}
    {% endfor %}
    </table>
{% else %}
    <p>No threads in a forum.
{% endif %}
{% endblock %}

Create template for thread list.
Create template for thread list.
