modified the name of assign_task_form to choice form since all it does is return a form with choices and made change accordingly.
authornishanth
Thu, 25 Feb 2010 04:01:11 +0530
changeset 91 1b5ad4b7c40e
parent 90 b2426897ff18
child 92 c99f09bebe56
modified the name of assign_task_form to choice form since all it does is return a form with choices and made change accordingly.
taskapp/forms/task.py
taskapp/views/task.py
--- a/taskapp/forms/task.py	Thu Feb 25 03:47:23 2010 +0530
+++ b/taskapp/forms/task.py	Thu Feb 25 04:01:11 2010 +0530
@@ -20,7 +20,7 @@
         model = Claim
         fields = ['message']
 
-def AssignTaskForm(choices, instance=None):
+def ChoiceForm(choices, instance=None):
     """ return a form object with appropriate choices """
     
     class myform(forms.Form):
--- a/taskapp/views/task.py	Thu Feb 25 03:47:23 2010 +0530
+++ b/taskapp/views/task.py	Thu Feb 25 04:01:11 2010 +0530
@@ -4,7 +4,7 @@
 from django.shortcuts import render_to_response, redirect
 
 from pytask.taskapp.models import User, Task, Comment, Claim
-from pytask.taskapp.forms.task import TaskCreateForm, AddMentorForm, AssignTaskForm, AddTaskForm 
+from pytask.taskapp.forms.task import TaskCreateForm, AddMentorForm, AddTaskForm 
 from pytask.taskapp.events.task import createTask, addMentor, publishTask, addSubTask, addDep, addClaim, assignTask, getTask, updateTask
 from pytask.taskapp.views.user import show_msg
 
@@ -290,7 +290,7 @@
     if (not is_guest) and is_mentor:
         if task_claimed:
             user_list = ((user.id,user.username) for user in claimed_users)
-            form = AssignTaskForm(user_list)
+            form = ChoiceForm(user_list)
     
             if request.method == "POST":
                 uid = request.POST['user']