django-admin2
django-admin2 copied to clipboard
Implement ModelAdmin2.list_editables
Warning: Thanks to research done by @oinopion on Django core we know that we have to completely rewrite how django.contrib.admin
provides this functionality. The problem is that which record(s) gets edited is currently tracked by list order, not by a consistent record identifier. This makes any serious use of the current django.contrib.admin
list_editables system extremely risky.
Is this a shortcoming in using model formsets in general, or just the way the admin does it?
That is just django admin, formsets will happily work with PKs.
Seems like my ModelFormSetView in django-extra-views (which we already have as a dependency) will do most of the work for us then. The current blocker is that Django's existing CBVs make it really awkward to paginate formsets, I was talking with @mjtamlyn about ways to address this, so it'd be good to get him involved.
Do we want to do pagination directly in normal CBVs or rely instead on django-rest-framework queries. I lean towards the latter.
Pagination brings me to other issue with django.contrib.admin which is that default django Paginator relies on COUNT(*) which has very bad performance.
We can address the performance issue by being dogmatic and only allowing next/previous pagination and using the greater-than trick.
Performance is a grave concern for us. We want to avoid django.contrib.admin
's issues and have speed. One of the really nice things about django-mongonaut is that it performs well under load.
:+1: for next/previous pagination, as proposed by @AndrewIngram