Django Admin Changelist Export¶
Your project description goes here
Documentation¶
The full documentation is at https://django-admin-changelist-export.readthedocs.io.
Quickstart¶
Install Django Admin Changelist Export:
pip install django-admin-changelist-export
Add it to your INSTALLED_APPS:
INSTALLED_APPS = (
...
'admin_changelist_export',
...
)
Add ChangelistExporterModelAdminMixin to your Admin, with actions and views (if you need a custom export):
class CustomUserAdmin(ChangelistExporterModelAdminMixin, DjangoUserAdmin):
actions = ["export_data_in_csv", "export_data_in_xls", "export_data_in_xlsx"]
csv_exporter_view = UserCSVExporterView
xls_exporter_view = UserXLSExporterView
xlsx_exporter_view = UserXLSXExporterView
admin.site.unregister(get_user_model())
admin.site.register(get_user_model(), CustomUserAdmin)
You can only add the mixin if you need only to download “AS-IS” changelist admin columns
Features¶
Can easily download changelist fields in .csv, .xls and .xlsx extensions.
Can add to an admin model views to customize its download.
Running Tests¶
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox
Development commands¶
pip install -r requirements_dev.txt
invoke -l
Credits¶
Tools used in rendering this package: