parent
8f87b5aed4
commit
54232db4a5
|
@ -398,11 +398,23 @@ class ExportMixin(ImportExportMixinBase):
|
|||
list_display = ['action_checkbox'] + list(list_display)
|
||||
|
||||
ChangeList = self.get_changelist(request)
|
||||
cl = ChangeList(request, self.model, list_display,
|
||||
list_display_links, list_filter, self.date_hierarchy,
|
||||
search_fields, self.list_select_related, self.list_per_page,
|
||||
self.list_max_show_all, self.list_editable, self
|
||||
)
|
||||
changelist_kwargs = {
|
||||
'request': request,
|
||||
'model': self.model,
|
||||
'list_display': list_display,
|
||||
'list_display_links': list_display_links,
|
||||
'list_filter': list_filter,
|
||||
'date_hierarchy': self.date_hierarchy,
|
||||
'search_fields': search_fields,
|
||||
'list_select_related': self.list_select_related,
|
||||
'list_per_page': self.list_per_page,
|
||||
'list_max_show_all': self.list_max_show_all,
|
||||
'list_editable': self.list_editable,
|
||||
'model_admin': self,
|
||||
}
|
||||
if django.VERSION >= (2, 1):
|
||||
changelist_kwargs['sortable_by'] = self.sortable_by
|
||||
cl = ChangeList(**changelist_kwargs)
|
||||
|
||||
return cl.get_queryset(request)
|
||||
|
||||
|
|
Loading…
Reference in New Issue