Exemplo n.º 1
0
    def get_context_data(self, **kwargs):
        context = super(ProjectStageTasksAjax, self).get_context_data(**kwargs)

        all_tasks = get_fabric_tasks(self.object.project)
        task_names = [x[0] for x in all_tasks]

        context["all_tasks"] = task_names
        context["frequent_tasks_run"] = models.Task.objects.filter(name__in=task_names).order_by("-times_used")[:3]

        return context
Exemplo n.º 2
0
    def get_context_data(self, **kwargs):
        context = super(ProjectStageTasksAjax, self).get_context_data(**kwargs)

        all_tasks = get_fabric_tasks(self.object.project)
        task_names = [x[0] for x in all_tasks]

        context['all_tasks'] = task_names
        context['frequent_tasks_run'] = models.Task.objects.filter(
            name__in=task_names).order_by('-times_used')[:3]

        return context