[Solved]-Django import-export: only export

33👍

from import_export.admin import ExportMixin

class BookAdmin(ExportMixin, admin.ModelAdmin):

5👍

If you want the action of Export Selected Books, you can use

class BookAdmin(ExportActionModelAdmin,admin.ModelAdmin):

2👍

As your question is not really described, I can only guess, that you want to remove the “import” button in the Admin view?

As described here you have to set the ExportMixin on your ModelAdmin. So it looks something like this

class BookAdmin(ExportMixin, ModelAdmin):
👤viirus

Leave a comment