New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor refactoring to support filtering exports #1579
Minor refactoring to support filtering exports #1579
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a useful tool. The general trend toward increasing granularity of operations makes sense to me and is something we will probably keep doing elsewhere.
Hi, can you please make a release with this fix? I can't customize the export form without this. |
yes, my plan is to release it this week |
Latest release (3.3.0) now available https://pypi.org/project/django-import-export/ |
Problem
#1578
It is not possible to modify the Admin UI to include a custom field for export. This is possible for import but not export.
The bug is due to the fact that the form is removed from kwargs hence cannot be used in custom Resources to filter the queryset.
Solution
pop()
call so that the form remains in kwargsfilter_export()
hook to make it a lot easier to dynamically filter querysets for exportAcceptance Criteria
Other refactoring
test_admin_integration.py
for better readability