summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authoradityacp2020-12-03 14:33:49 +0530
committeradityacp2020-12-03 14:33:49 +0530
commit882fe5cdaee8bc61e51f6626cc3941356905bb61 (patch)
tree05e3dc09075253d79239a9fbab3745f85bd72d6f /yaksh/views.py
parente461b7c71d3d33f7e1cde4415ae35733078f4070 (diff)
downloadonline_test-882fe5cdaee8bc61e51f6626cc3941356905bb61.tar.gz
online_test-882fe5cdaee8bc61e51f6626cc3941356905bb61.tar.bz2
online_test-882fe5cdaee8bc61e51f6626cc3941356905bb61.zip
Minor UI change in course discussion forum
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index 95a7218..11a77b8 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -3507,6 +3507,7 @@ def course_forum(request, course_id):
new_post.target = course
new_post.anonymous = request.POST.get('anonymous', '') == 'on'
new_post.save()
+ messages.success(request, "Added post successfully")
return redirect('yaksh:post_comments',
course_id=course.id, uuid=new_post.uid)
else:
@@ -3565,6 +3566,7 @@ def post_comments(request, course_id, uuid):
new_comment.post_field = post
new_comment.anonymous = request.POST.get('anonymous', '') == 'on'
new_comment.save()
+ messages.success(request, "Added comment successfully")
return redirect(request.path_info)
return render(request, 'yaksh/post_comments.html', {
'post': post,
@@ -3589,6 +3591,7 @@ def hide_post(request, course_id, uuid):
post.comment.active = False
post.active = False
post.save()
+ messages.success(request, "Post deleted successfully")
return redirect('yaksh:course_forum', course_id)
@@ -3606,6 +3609,7 @@ def hide_comment(request, course_id, uuid):
post_uid = comment.post_field.uid
comment.active = False
comment.save()
+ messages.success(request, "Post comment deleted successfully")
return redirect('yaksh:post_comments', course_id, post_uid)