Re: [Django] #4065: Ability to disable admin pagination

47 views
Skip to first unread message

Django

unread,
May 24, 2011, 11:35:48 AM5/24/11
to django-...@googlegroups.com
#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.

Django

unread,
May 24, 2011, 11:42:11 AM5/24/11
to django-...@googlegroups.com
#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 |
-------------------------------------+-------------------------------------

Comment (by adamnelson):

I strongly agree with boxm on this one. Counting the number of records is
often most onerous for the very sets that need to be paginated. The
!UncountedPaginator is a great solution.

--
Ticket URL: <https://code.djangoproject.com/ticket/4065#comment:12>

Django

unread,
May 26, 2011, 9:47:24 AM5/26/11
to django-...@googlegroups.com
#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 |
-------------------------------------+-------------------------------------

Comment (by boxm):

Patch that implements above idea on #8408 - this should enable a
NullPaginator to work with admin

--
Ticket URL: <https://code.djangoproject.com/ticket/4065#comment:13>

Django

unread,
Sep 18, 2011, 4:57:20 PM9/18/11
to django-...@googlegroups.com
#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 |
UI/UX: 0 |
-------------------------------------+-------------------------------------
Changes (by mitar):

* cc: mmitar@… (added)
* ui_ux: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/4065#comment:14>

Django

unread,
Dec 16, 2012, 9:37:54 AM12/16/12
to django-...@googlegroups.com
#4065: Ability to disable admin pagination
-------------------------------------+-------------------------------------
Reporter: Marek Kubica | Owner: adamv
<pythonmailing@…> | Status: reopened
Type: New feature | Version: master
Component: contrib.admin | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: nfa-changelist | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* stage: Someday/Maybe => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/4065#comment:15>

Django

unread,
Dec 16, 2012, 12:30:59 PM12/16/12
to django-...@googlegroups.com
#4065: Ability to disable admin pagination
-------------------------------------+-------------------------------------
Reporter: Marek Kubica | Owner: aaugustin
<pythonmailing@…> | Status: new

Type: New feature | Version: master
Component: contrib.admin | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: nfa-changelist | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by anonymous):

* owner: adamv => aaugustin
* status: reopened => new


--
Ticket URL: <https://code.djangoproject.com/ticket/4065#comment:16>

Django

unread,
Dec 16, 2012, 12:50:22 PM12/16/12
to django-...@googlegroups.com
#4065: Ability to disable admin pagination
-------------------------------------+-------------------------------------
Reporter: Marek Kubica | Owner: nobody

<pythonmailing@…> | Status: new
Type: New feature | Version: master
Component: contrib.admin | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: nfa-changelist | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* owner: aaugustin => nobody


Comment:

Please don't assigned tickets to people without their consent. I'm not
going to work on this.

--
Ticket URL: <https://code.djangoproject.com/ticket/4065#comment:17>

Django

unread,
Jan 26, 2015, 11:29:03 AM1/26/15
to django-...@googlegroups.com
#4065: Ability to disable admin pagination
-------------------------------------+-------------------------------------
Reporter: Marek Kubica | Owner: nobody
<pythonmailing@…> |
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: nfa-changelist | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by collinanderson):

* cc: cmawebsite@… (added)


Comment:

I believe this issue is fixed in 1.8 by the `show_full_result_count`
option (ticket #8408 mentioned above).

https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.show_full_result_count

Can everything else be handled by setting `list_per_page` to a very large
number?

--
Ticket URL: <https://code.djangoproject.com/ticket/4065#comment:18>

Django

unread,
Jan 26, 2015, 5:05:10 PM1/26/15
to django-...@googlegroups.com
#4065: Ability to disable admin pagination
-------------------------------------+-------------------------------------
Reporter: Marek Kubica | Owner: nobody
<pythonmailing@…> |
Type: New feature | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: fixed

Keywords: nfa-changelist | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Leonidas-from-XIV):

* status: new => closed
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/4065#comment:19>

Django

unread,
Aug 7, 2015, 2:00:05 AM8/7/15
to django-...@googlegroups.com
#4065: Ability to disable admin pagination
-------------------------------------+-------------------------------------
Reporter: Marek Kubica | Owner: nobody
<pythonmailing@…> |
Type: New feature | Status: new

Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: nfa-changelist | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by dhui):

* cc: dhui (added)
* status: closed => new
* resolution: fixed =>


Comment:

`show_full_result_count` does not fix the issue as `paginator.count` is
still called:
https://github.com/django/django/blob/1.8.3/django/contrib/admin/views/main.py#L177

--
Ticket URL: <https://code.djangoproject.com/ticket/4065#comment:20>

Django

unread,
Feb 2, 2016, 4:31:11 PM2/2/16
to django-...@googlegroups.com
#4065: Ability to disable admin pagination
-------------------------------------+-------------------------------------
Reporter: Marek Kubica | Owner: nobody
<pythonmailing@…> |
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: nfa-changelist | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by sasha0):

It does fix the issue, since `paginator.count` return '''total''' number
of objects -
https://github.com/django/django/blob/1.8.3/django/core/paginator.py#L66

Thus, I believe the ticket could be closed.

--
Ticket URL: <https://code.djangoproject.com/ticket/4065#comment:21>

Django

unread,
Feb 2, 2016, 5:45:38 PM2/2/16
to django-...@googlegroups.com
#4065: Ability to disable admin pagination
-------------------------------------+-------------------------------------
Reporter: Marek Kubica | Owner: nobody
<pythonmailing@…> |
Type: New feature | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: fixed

Keywords: nfa-changelist | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/4065#comment:22>

Reply all
Reply to author
Forward
0 new messages