django-admin-inline-paginator
django-admin-inline-paginator copied to clipboard
Fix pagination keys in preserved filters querystring
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: https://github.com/shinneider/django-admin-inline-paginator/blob/53bf9162dfc724386f03dc3ecdcddbb1e3d07b70/django_admin_inline_paginator/admin.py#L31-L37
Django preserves only _changelist_filters
:
https://github.com/django/django/blob/f6f0699d01f5840437bfd236c76c797943ef8edc/django/contrib/admin/options.py#L1039-L1055
Discussions
- I'm not convinced by the use of
inline_pagination_keys
inModelAdmin
. -
InlineModelPaginated
naming