taskapp/views/task.py
changeset 131 85276c5aee5c
parent 126 e5377fdaf110
child 135 0ede6b2c5cd1
equal deleted inserted replaced
130:9417ae986d2a 131:85276c5aee5c
   178             uid = request.POST['mentor']
   178             uid = request.POST['mentor']
   179             new_mentor = User.objects.get(id=uid)
   179             new_mentor = User.objects.get(id=uid)
   180             reqMentor(task, new_mentor, user)
   180             reqMentor(task, new_mentor, user)
   181             return redirect(task_url)
   181             return redirect(task_url)
   182         else:
   182         else:
   183             return render_to_response('task/addmentor.html', {'form':form, 'errors':errors})
   183             return render_to_response('task/addmentor.html', {'user':user,'form':form, 'errors':errors})
   184         
   184         
   185     else:
   185     else:
   186         return show_msg(user, 'You are not authorised to add mentors for this task', task_url, 'view the task')
   186         return show_msg(user, 'You are not authorised to add mentors for this task', task_url, 'view the task')
   187     
   187     
   188 def add_tasks(request, tid):
   188 def add_tasks(request, tid):