def export_as_xls(self, request, queryset): opts = self.model._meta file_name = unidecode(opts.verbose_name) sql_query = \'\'\'SELECT