Admin action for a generic "CSV Export"
Based on [#2020](/snippets/2020/) Save the snippet as actions.py within your django app, and then add an action on any model you want in it's ModelAdmin definition. Example usage: from actions import export_as_csv_action class YourModelAdmin(admin.ModelAdmin): list_display = (...) list_filter = [...] actions = [export_as_csv_action("CSV Export", fields=[...])] * - Added UTF-8 encoding support * - Bugs fixed
- admin
- export
- csv
- action