Esempio n. 1
0
 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
Esempio n. 2
0
 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
Esempio n. 3
0
 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
Esempio n. 4
0
 def get_serializer_class(self):
     if is_tableau(self.request) is True:
         return AppealDocumentTableauSerializer
     return AppealDocumentSerializer
Esempio n. 5
0
 def get_serializer_class(self):
     if is_tableau(self.request) is True:
         return AppealHistoryTableauSerializer
         # return AppealTableauSerializer
     return AppealHistorySerializer
Esempio n. 6
0
 def get_serializer_class(self):
     if is_tableau(self.request) is True:
         return SituationReportTableauSerializer
     return SituationReportSerializer
Esempio n. 7
0
 def get_serializer_class(self):
     if is_tableau(self.request) is True:
         return CountrySnippetTableauSerializer
     return CountrySnippetSerializer
Esempio n. 8
0
 def get_serializer_class(self):
     if is_tableau(self.request) is True:
         return PartnerDeploymentTableauSerializer
     return PartnerDeploymentSerializer