def response(self, request, username, project_slug):
        task_list = Task.objects.filter(project__id=self.project.id)\
                .select_related('priority', 'status', 'author', 'project')
        filters = TaskFilter(self.request.GET, queryset=task_list,
            project=self.project)
        if self.request.GET and 'id' in self.request.GET and \
                self.request.GET['id'] and filters.qs.count() == 1:
            task = filters.qs[0]
            messages.info(self.request, _("One task matched - redirecting..."))
            return redirect(task.get_absolute_url())
        self.context['filters'] = filters
        return self.context
dataset/ETHPy150Open lukaszb/django-projector/projector/views/project_task.py/TaskListView.response/original