update: modified index template to include the button to add new forum post

parent 5a7a0601
......@@ -9,8 +9,10 @@
{% for post in posts_list %}
<li><a href="{% url 'forum:detail' post.id %}">{{ post.post_title }}</a> by {{ post.author.first_name }} {{ post.author.last_name}} dated {{ post.pub_date|date:"SHORT_DATE_FORMAT" }}</li>
{% endfor %}
<button onclick="location.href = '/posts/add'">New Forum Post</button>
</ul>
{% else %}
<p>No posts are available.</p>
<button onclick="location.href = '/posts/add'">New Forum Post</button>
{% 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