summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authorCruiseDevice2020-04-16 18:45:11 +0530
committerCruiseDevice2020-04-16 18:45:11 +0530
commitd60c6b528e893266da10f7e83b5f2e7ef4d4b6dc (patch)
tree8821fc7ba92794a77f68a5c35bd389d9f3671315 /yaksh/views.py
parent1ea20bdcd11d38d49030b4009fc91c9df56eedf7 (diff)
downloadonline_test-d60c6b528e893266da10f7e83b5f2e7ef4d4b6dc.tar.gz
online_test-d60c6b528e893266da10f7e83b5f2e7ef4d4b6dc.tar.bz2
online_test-d60c6b528e893266da10f7e83b5f2e7ef4d4b6dc.zip
PEP8 fix
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index 01d5f48..afb07f4 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -3199,7 +3199,7 @@ def course_forum(request, course_id):
user = request.user
course = get_object_or_404(Course, id=course_id)
if (not course.is_creator(user) and not course.is_teacher(user)
- and not course.is_student(user)):
+ and not course.is_student(user)):
raise Http404('You are not enrolled in {0} course'.format(course.name))
posts = course.post.filter(active=True).order_by('-modified_at')
if request.method == "POST":
@@ -3230,7 +3230,7 @@ def post_comments(request, course_id, uuid):
comments = post.comment.filter(active=True)
course = get_object_or_404(Course, id=course_id)
if (not course.is_creator(user) and not course.is_teacher(user)
- and not course.is_student(user)):
+ and not course.is_student(user)):
raise Http404('You are not enrolled in {0} course'.format(course.name))
form = CommentForm()
if request.method == "POST":
@@ -3255,7 +3255,7 @@ def hide_post(request, course_id, uuid):
user = request.user
course = get_object_or_404(Course, id=course_id)
if (not course.is_creator(user) and not course.is_teacher(user)
- and not course.is_student(user)):
+ and not course.is_student(user)):
raise Http404('You are not enrolled in {0} course'.format(course.name))
post = get_object_or_404(Post, uid=uuid)
post.comment.active = False
@@ -3270,7 +3270,7 @@ def hide_comment(request, course_id, uuid):
user = request.user
course = get_object_or_404(Course, id=course_id)
if (not course.is_creator(user) and not course.is_teacher(user)
- and not course.is_student(user)):
+ and not course.is_student(user)):
raise Http404('You are not enrolled in {0} course'.format(course.name))
comment = get_object_or_404(Comment, uid=uuid)
post_uid = comment.post_field.uid