Exemple #1
0
 def _get_xls_response(self, ids=()):
     list_xls = get_metadata(self.qs.model, 'list_xls')
     qs = self.get_queryset(False)
     if ids:
         qs = qs.filter(id__in=ids)
     return XlsResponse([(u'Dados', tolist(qs, list_display=list_xls))])
Exemple #2
0
 def _get_csv_response(self, ids=()):
     list_csv = get_metadata(self.qs.model, 'list_csv')
     qs = self.get_queryset(False)
     if ids:
         qs = qs.filter(id__in=ids)
     return CsvResponse(tolist(qs, list_display=list_csv))