def get_serializer_class(self): if self.request.GET.get('mini', 'false').lower() == 'true': return MiniCountrySerializer if is_tableau(self.request) is True: return CountryTableauSerializer if self.action == 'list': return CountryGeoSerializer return CountryRelationSerializer
def get_serializer_class(self): if is_tableau(self.request) is True: return ListFieldReportTableauSerializer if self.action == 'list': request_format_type = self.request.GET.get('format', 'json') if request_format_type == 'csv': return ListFieldReportCsvSerializer else: return ListFieldReportSerializer else: return DetailFieldReportSerializer
def get_serializer_class(self): if self.action == 'mini_events': return ListMiniEventSerializer elif self.action == 'list': request_format_type = self.request.GET.get('format', 'json') if request_format_type == 'csv': return ListEventCsvSerializer elif is_tableau(self.request) is True: return ListEventTableauSerializer else: return ListEventSerializer else: return DetailEventSerializer
def get_serializer_class(self): if is_tableau(self.request) is True: return AppealDocumentTableauSerializer return AppealDocumentSerializer
def get_serializer_class(self): if is_tableau(self.request) is True: return AppealHistoryTableauSerializer # return AppealTableauSerializer return AppealHistorySerializer
def get_serializer_class(self): if is_tableau(self.request) is True: return SituationReportTableauSerializer return SituationReportSerializer
def get_serializer_class(self): if is_tableau(self.request) is True: return CountrySnippetTableauSerializer return CountrySnippetSerializer
def get_serializer_class(self): if is_tableau(self.request) is True: return PartnerDeploymentTableauSerializer return PartnerDeploymentSerializer