--- a/taskapp/views/task.py Tue Mar 02 02:12:57 2010 +0530
+++ b/taskapp/views/task.py Tue Mar 02 02:25:28 2010 +0530
@@ -132,7 +132,7 @@
title = data['title']
desc = data['desc']
credits = data['credits']
- publish = data['publish']
+ #publish = data['publish'] # just in case if we have to show the option
task = createTask(title,desc,user,credits)
if not task:
@@ -537,7 +537,7 @@
data = form.cleaned_data
title = data['title']
try:
- prev_task = Task.objects.get(title=title)
+ prev_task = Task.objects.exclude(status="DL").get(title=title)
if prev_task != task:
error_msg = "Another task exists with the same title"
return render_to_response('task/edittask.html',{'user':user, 'form':form, 'error_msg':error_msg})
@@ -556,9 +556,6 @@
else:
return show_msg(user, "You cannot edit the task at this stage", task_url, "view the task")
-
-
-
def complete_task(request, tid):
""" call the event called complete task.
and also pass it the current user to know who marked it as complete.