equal
deleted
inserted
replaced
102 elif task.status == "WR": |
102 elif task.status == "WR": |
103 context['assigned_users'] = task.assigned_users.all() |
103 context['assigned_users'] = task.assigned_users.all() |
104 |
104 |
105 if request.method == 'POST': |
105 if request.method == 'POST': |
106 if not is_guest: |
106 if not is_guest: |
107 data = request.POST["data"] |
107 data = request.POST.get("data", "").strip() |
|
108 if not data: |
|
109 context['error_msg'] = "Enter some message to comment" |
|
110 return render_to_response('task/view.html', context) |
108 new_comment = Comment(task=task, data=data, created_by=user, creation_datetime=datetime.now()) |
111 new_comment = Comment(task=task, data=data, created_by=user, creation_datetime=datetime.now()) |
109 new_comment.save() |
112 new_comment.save() |
110 return redirect(task_url) |
113 return redirect(task_url) |
111 else: |
114 else: |
112 errors.append("You must be logged in to post a comment") |
115 errors.append("You must be logged in to post a comment") |