def callback_assign2(sender, **kwargs): """ Assign this task to everyone who activates the signals and isn't already doing the task. """ user = kwargs['user'] task = kwargs['task'] url = ynmp_login_url(user, "bad_details") msg = "" try: TaskUser.objects.assign_task(task, user, url) except TaskUser.AlreadyAssigned: msg = "%s already assigned to %s" % (task, user) return msg
def start(request): # http://localhost:8008/tasks/ynmp-details/start/523bad3799ed898218d87234f47c8a7c444fb967/ return HttpResponseRedirect(ynmp_login_url(request.user, "bad_details"))