def get_context_data(self, **kwargs): context = SpecificQuestionListView.get_context_data(self, **kwargs) context.update(lookup_ml_membership(self.context_object)) context.update({ 'active_tab': 'discuss', 'workgroup': self.context_object, }) return context
def get_context_data(self, **kwargs): context = SpecificQuestionListView.get_context_data(self, **kwargs) context.update( { "project": self.context_object.master, "project_translation": self.context_object, "tab_context": "project_sheet", "tab_name": "discuss", } ) return context
def get_context_data(self, **kwargs): context = SpecificQuestionListView.get_context_data(self, **kwargs) allowed_categories = self.get_specific_types().values_list('allowed_category_tree', flat=True).distinct() root_category = None if allowed_categories.count(): root_category = TaggedCategory.objects.get(id=allowed_categories[0]) context.update({ 'tab_name' : 'support', 'prop_count' : self.get_specific_questions().filter(type__type="pj-help").count(), 'call_count' : self.get_specific_questions().filter(type__type="pj-need").count(), 'need_count' : self.get_specific_questions().count(), 'root_category' : root_category, }) return context
def get_context_data(self, **kwargs): context = SpecificQuestionListView.get_context_data(self, **kwargs) prop_count = SpecificQuestion.objects.filter(type__in=SpecificQuestionType.objects.filter(type="pj-help"), object_id=self.context_object.pk).count() call_count = SpecificQuestion.objects.filter(type__in=SpecificQuestionType.objects.filter(type="pj-need"), object_id=self.context_object.pk).count() need_count = prop_count + call_count context.update({ 'project': self.context_object.master, 'project_translation': self.context_object, 'tab_context': 'project_sheet', 'tab_name': 'discuss', 'discussion_count': len(context['specific_questions']), 'need_count': need_count, }) return context
def get_context_data(self, **kwargs): context = SpecificQuestionListView.get_context_data(self, **kwargs) prop_count = SpecificQuestion.objects.filter( type__in=SpecificQuestionType.objects.filter(type="pj-help"), object_id=self.context_object.pk).count() call_count = SpecificQuestion.objects.filter( type__in=SpecificQuestionType.objects.filter(type="pj-need"), object_id=self.context_object.pk).count() need_count = prop_count + call_count context.update({ 'project': self.context_object.master, 'project_translation': self.context_object, 'tab_context': 'project_sheet', 'tab_name': 'discuss', 'discussion_count': len(context['specific_questions']), 'need_count': need_count, }) return context