#4065: Ability to disable admin pagination
-------------------------------------+-------------------------------------
Reporter: Marek | Owner: adamv
Kubica <pythonmailing@…> | Status: reopened
Type: New | Component: contrib.admin
feature | Severity: Normal
Milestone: | Keywords: nfa-changelist
Version: SVN | Has patch: 0
Resolution: | Needs tests: 0
Triage Stage: | Easy pickings: 0
Someday/Maybe |
Needs documentation: 0 |
Patch needs improvement: 0 |
-------------------------------------+-------------------------------------
Changes (by boxm):
* cc: boxm@… (added)
* easy: => 0
Comment:
I've been looking at this today and there's quite a few places where the
assumption that the paginator is dealing with a countable set is made.
Making it work where you don't want to/can't count the number of items in
the set means changing:
1. the {% search %} admin tag
2. the {% pagination %} admin tag
3. the ChangeList class (in changelist_view method)
4. the paginator to one that doesn't implement count, num_pages and
page_range properties
1 & 2 can be fixed by overriding the change_list.html template to use
alternative template tags (e.g. {% infinite_pagination %}). 3 requires
deriving from ModelAdmin and cut'n'pasting the entire method. 4 is
available here: http://code.google.com/p/django-
pagination/source/browse/trunk/pagination/paginator.py
However this is really ugly and a lot of work for someone.
I think ideally the template tags and ChangeList class should be updated
to not assume the ability to access the count, num_pages and page_range
properties - ie have an "UncountedPaginator". Possibly this would be a
base class of Paginator so you'd have NullPaginator (displays everything)
-> UncountedPaginator -> Paginator.
--
Ticket URL: <https://code.djangoproject.com/ticket/4065#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.