{% load url from future %}

<!-- Posts  -->
<div class="ttitle">{{ topic.title }}</div>
<div id="list">

    {% for post in posts.object_list %}
        <div class="post">
            <span class="title">{{ post.title }}</span><br />
            by {{ post.creator }} | <span class="date">{{ post.created }}</span> <br /><br />
            {{ post.body }} <br />
        </div>
    {% endfor %}
</div>

<!-- Next/Prev page links  -->
{% if posts.object_list and posts.paginator.num_pages > 1 %}
<div class="pagination">
    <span class="step-links">
        {% if posts.has_previous %}
            <a href= "?page={{ posts.previous_page_number }}">previous &lt;&lt; </a>
        {% endif %}

        <span class="current">
            &nbsp;Page {{ posts.number }} of {{ topics.paginator.num_pages }}
        </span>

        {% if posts.has_next %}
            <a href="?page={{ posts.next_page_number }}"> &gt;&gt; next</a>
        {% endif %}
    </span>
</div>
{% endif %}
<a class="button" href="{% url 'reply' pk %}">Reply</a>
