def get_context_data(self, **kwargs): ctx = super().get_context_data(**kwargs) if ctx['object'].status == 0: ctx['object'].status = 'Fail' elif ctx['object'].status == 1: ctx['object'].status = 'Success' elif ctx['object'].status == 2: ctx['object'].status = 'Progress' elif ctx['object'].status == 3: ctx['object'].status = 'Begin' ctx['object'].total_team = return_total_team_of_project(self.object) ctx['list_team_of_project'] = return_list_team_of_project(self.object) return ctx
def get_context_data(self, **kwargs): ctx = super().get_context_data(**kwargs) ctx['list_team_of_project'] = return_list_team_of_project(self.object) ctx['list_team_not_of_project'] = return_list_team_not_of_project(self.object) ctx['status'] = self.object.status return ctx