-
Notifications
You must be signed in to change notification settings - Fork 172
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
Cannot paginate using ModelFormSetView
#261
Comments
@AndrewIngram - I built a suite of CBVs on top of ModelFormSetView that integrate django-tables2 and django-filter. Includes a ModelFormsetTable view, FilteredModelFormset view, and FilteredModelFormsetTable view. These views leave it to django-tables2 to handle pagination. They also greatly simplify (i.e. virtually eliminate) template logic for rendering such tabular formset views. I'm considering options to release these and it makes sense to bundle them with django-extra-views, perhaps as a contrib package with a fmft (filtered-model-formset-table) module? Wondering if you'd be open to such a pull request, and if so if you have thoughts or preferences for the package structure? |
Hi @powderflask, that does sound interesting although I'd be wary of making django-tables2 and django-filter dependencies of this package. Also it would increase the testing complexity as changes to those packages could break this one. What if you added your code as a new section in the documentation for this project, rather than as a contrib package? I use |
@sdolemelipone that makes sense. Nice offer re: documentation, seems like a logical level to connect the 2 projects. I'll propose a docs PR for re: pagination - it simply uses the |
For anyone interested... |
The following code does not return 10 results as expected - all results from the model are returned instead. This is problematic when the table contains a lot of results:
I see that there is a PR open to handle pagination but it's from September 2021 and there's not been any activity on it for some time. I'm currently testing that PR locally but thought I'd create an issue to see if there are any alternatives
The text was updated successfully, but these errors were encountered: