Commit c1ba77d3 authored by Rurik Serzo's avatar Rurik Serzo

Adjusted url code from forum/ to posts/

parent 6b789112
No preview for this file type
......@@ -13,12 +13,12 @@
<ul class="post-list">
{% for post in posts %}
<li>
<a href="/forum/{{ post.id }}/details">
<a href="/posts/{{ post.id }}/details">
{{ post.post_title }} by {{ post.author.first_name }} {{ post.author.last_name }}
dated {{ post.pub_date|date:'d/m/Y' }}
</a>
</li>
{% endfor %}
</ul>
<a href="/forum/add" class="button-style">New Forum Post</a>
<a href="/posts/add" class="button-style">New Forum Post</a>
{% endblock %}
\ No newline at end of file
......@@ -9,7 +9,7 @@
{% block content %}
<h1>New Forum Post</h1>
<form action="{% url 'forum:new-post' %}" method="POST">
<form action="{% url 'posts:new-post' %}" method="POST">
{% csrf_token %}
{{ post_form.as_p }}
......
......@@ -23,4 +23,5 @@ urlpatterns = [
path('homepage/', include('homepage.urls', namespace='homepage')),
path('assignments/', include('assignments.urls', namespace='assignments')),
path('users/', include('homepage.urls', namespace='users')),
path('posts/', include('forum.urls', namespace='posts')),
]
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