Skip to content
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

Number of output records is restricted implicitly by the Django option #3

Open
nnseva opened this issue Jul 30, 2020 · 1 comment
Open

Comments

@nnseva
Copy link
Contributor

nnseva commented Jul 30, 2020

The Django option settings.DATA_UPLOAD_MAX_NUMBER_FIELDS restricts the max number of output records implicitly because the export form contains every record ID in a separate POST field. When the output records number exceeds this value the request fails with code 400.

As a temporary workaround, the settings.DATA_UPLOAD_MAX_NUMBER_FIELDS may be assigned to None to avoid this restriction.

Probably this issue may be resolved in a package using one POST field to store all output record IDs instead of separate fields, as other Django actions do. Then the Django option may be left unchanged. Such a change will also lead to a more compact page.

@thomst
Copy link
Owner

thomst commented Sep 6, 2020

Unfortunatly there is no easy solution for this issue. As we plug in into the logic of django admin action we need to pass the item ids in seperated fields named _selected_action. They will be collected in request.POST['_selected_action'] as a list of ids. And that is the format the admin action routines expect them to be. I do not know of any way to pass the ids in one input field but let them be a list of ids on the other end in the POST dictonary.

@nnseva : If you have any ideas how to achieve this feel free to try them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants