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