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):
- Celery immediately exceeds memory on Heroku
- Django A/B Split Testing Packages (None I've found are well-documented and up-to-date.)
- What is the difference between syncdb and migrate?
- Using Django's collectstatic with boto S3 throws "Error 32: Broken Pipe" after a while
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):
- Django – how to get user logged in (get_queryset in ListView)
- Django – annotate() – Sum() of a column with filter on another column
Source:stackexchange.com