summaryrefslogtreecommitdiff
path: root/taskapp/views/task.py
diff options
context:
space:
mode:
authornishanth2010-03-02 02:25:28 +0530
committernishanth2010-03-02 02:25:28 +0530
commitc96afacd4dd27cbf092eb398862ac9dc120e9309 (patch)
tree4f34b6b0463e240c8442287c0b56409f3cb1739e /taskapp/views/task.py
parentca946289e5f0b54483839c8a3671096774877827 (diff)
downloadpytask-c96afacd4dd27cbf092eb398862ac9dc120e9309.tar.gz
pytask-c96afacd4dd27cbf092eb398862ac9dc120e9309.tar.bz2
pytask-c96afacd4dd27cbf092eb398862ac9dc120e9309.zip
now task can have a title of a deleted task.
Diffstat (limited to 'taskapp/views/task.py')
-rw-r--r--taskapp/views/task.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/taskapp/views/task.py b/taskapp/views/task.py
index 17bbf3c..85041a0 100644
--- a/taskapp/views/task.py
+++ b/taskapp/views/task.py
@@ -132,7 +132,7 @@ def create_task(request):
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 @@ def edit_task(request, tid):
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 @@ def edit_task(request, tid):
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.