# HG changeset patch # User Madhusudan.C.S # Date 1295556119 -19800 # Node ID 1d4631fcebd06882d7efcb1ff89230b9c640dc56 # Parent db2edf9228498f7581807b1e7bdc3ab845d56bcb Add uberbar messages not to claim the task. This must be disabled once claiming is possible. diff -r db2edf922849 -r 1d4631fcebd0 pytask/taskapp/views.py --- a/pytask/taskapp/views.py Fri Jan 21 02:11:25 2011 +0530 +++ b/pytask/taskapp/views.py Fri Jan 21 02:11:59 2011 +0530 @@ -8,6 +8,7 @@ from django.core.urlresolvers import reverse from django.template import RequestContext from django.utils import simplejson as json +from django.utils.translation import ugettext from tagging.managers import TaggedItem from tagging.models import Tag @@ -20,6 +21,14 @@ from pytask.taskapp import models as taskapp_models +DONT_CLAIM_TASK_MSG = ugettext( + "Please don't submit any claims for the tasks until the workshop is " + "over. During the workshop we will introduce you to the work-flow of " + "this entire project. Also please be warned that the task claim work-" + "flow may change. So all the claims submitted before the workshop may " + "not be valid.") + + @login_required def create_task(request): @@ -62,9 +71,7 @@ def browse_tasks(request): - open_tasks = taskapp_models.Task.objects.filter(status=taskapp_models.TASK_STATUS_CHOICES[1][0]) - working_tasks = taskapp_models.Task.objects.filter(status=taskapp_models.TASK_STATUS_CHOICES[3][0]) - comp_tasks = taskapp_models.Task.objects.filter(status=taskapp_models.TASK_STATUS_CHOICES[6][0]) + context = {} # TODO(disable): Disable once the tasks can be claimed context['uberbar_message'] = DONT_CLAIM_TASK_MSG @@ -116,6 +123,11 @@ check for authentication and add a comment if it is a post request. """ + context = {} + + # TODO(disable): Disable once the tasks can be claimed + context['uberbar_message'] = DONT_CLAIM_TASK_MSG + task_url = reverse('view_task', kwargs={'task_id': task_id}) task = shortcuts.get_object_or_404(taskapp_models.Task, pk=task_id) @@ -647,6 +659,11 @@ @login_required def claim_task(request, task_id): + context = {} + + # TODO(disable): Disable once the tasks can be claimed + context['uberbar_message'] = DONT_CLAIM_TASK_MSG + claim_url = reverse('claim_task', kwargs={'task_id': task_id}) task = shortcuts.get_object_or_404(taskapp_models.Task, pk=task_id)