Fix pagination keys in preserved filters querystring #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
May fix this issue #20
Problem
Changes from the 2nd page onwards are not saved.
Solution
It appears that model change form doesn't contain the action url with pagination key. So when we click on save then Django lose the pagination context and save the wrong formset (default is for page 1).
Inline pagination needs context on each requests:
django-admin-inline-paginator/django_admin_inline_paginator/admin.py
Lines 31 to 37 in 53bf916
Django preserves only
_changelist_filters
:https://github.com/django/django/blob/f6f0699d01f5840437bfd236c76c797943ef8edc/django/contrib/admin/options.py#L1039-L1055
Discussions
inline_pagination_keys
inModelAdmin
.InlineModelPaginated
naming