Use reverse function instead of hard coded URL.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Sun, 16 Jan 2011 23:16:21 +0530
changeset 430 a11a778fca54
parent 429 288ce2de2172
child 431 fcc87a3f0311
Use reverse function instead of hard coded URL. Had missed my eyes in the last run.
pytask/taskapp/views.py
--- a/pytask/taskapp/views.py	Sun Jan 16 20:56:58 2011 +0530
+++ b/pytask/taskapp/views.py	Sun Jan 16 23:16:21 2011 +0530
@@ -520,7 +520,7 @@
 @login_required
 def claim_task(request, task_id):
 
-    claim_url = "/task/claim/task_id=%s"%task_id
+    claim_url = reverse('claim_task', kwargs={'task_id': task_id})
     task = shortcuts.get_object_or_404(taskapp_models.Task, pk=task_id)
 
     if task.status == "UP":