summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorCruiseDevice2020-09-05 16:31:29 +0530
committerankitjavalkar2020-10-08 10:38:06 +0530
commite4a9897685b4958efb0d5bd86f57dc1584449619 (patch)
tree8cbda921879e957070f0023f1960bdb573210d2d /yaksh/templates
parentf61351f6a4e7a6150e66ca39f23ac14f9a60de96 (diff)
downloadonline_test-e4a9897685b4958efb0d5bd86f57dc1584449619.tar.gz
online_test-e4a9897685b4958efb0d5bd86f57dc1584449619.tar.bz2
online_test-e4a9897685b4958efb0d5bd86f57dc1584449619.zip
Make Post model generic.
- Fix breaking links in forum after change in models.
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/post_comments.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/yaksh/templates/yaksh/post_comments.html b/yaksh/templates/yaksh/post_comments.html
index b16b80c..f0f1593 100644
--- a/yaksh/templates/yaksh/post_comments.html
+++ b/yaksh/templates/yaksh/post_comments.html
@@ -6,7 +6,7 @@
{% block content %}
<div class="container">
- <a class="btn btn-primary" href="{% url 'yaksh:course_forum' post.course.id %}">
+ <a class="btn btn-primary" href="{% url 'yaksh:course_forum' post.target.id %}">
<i class="fa fa-arrow-left"></i>&nbsp;Back to Posts
</a>
<br>
@@ -18,7 +18,7 @@
<small>
<strong>{{post.creator.username}}</strong>
{{post.created_at}}
- {% if user.profile.is_moderator %}<a href="{% url 'yaksh:hide_post' post.course.id post.uid %}" class="pull-right btn btn-danger">Delete</a>{% endif %}
+ {% if user.profile.is_moderator %}<a href="{% url 'yaksh:hide_post' post.target.id post.uid %}" class="pull-right btn btn-danger">Delete</a>{% endif %}
</small>
</div>
@@ -41,7 +41,7 @@
<strong class="text-muted">{{comment.creator.username}}</strong>
</div>
<div class="col-6 text-right">
- <small class="text-muted">{{comment.created_at}} {% if user.profile.is_moderator %} <a href="{% url 'yaksh:hide_comment' post.course.id comment.uid %}" class="btn btn-danger">Delete</a>{% endif %}</small>
+ <small class="text-muted">{{comment.created_at}} {% if user.profile.is_moderator %} <a href="{% url 'yaksh:hide_comment' post.target.id comment.uid %}" class="btn btn-danger">Delete</a>{% endif %}</small>
</div>
</div>
<p class="card-text description">{{comment.description}}</p>
@@ -59,7 +59,7 @@
<br>
<div>
<b><u>Add comment:</u></b>
- <form action="{% url 'yaksh:post_comments' post.course.id post.uid %}" method="POST" enctype='multipart/form-data'>
+ <form action="" method="POST" enctype='multipart/form-data'>
<div class="form-group">
{% csrf_token %}
{{form}}