Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
#1342 Allow customization of MAX_SHOW_ALL_ALLOWED. Reopen or new ticket?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jim D.  
View profile  
 More options May 10 2011, 3:09 pm
From: "Jim D." <jim.dal...@gmail.com>
Date: Tue, 10 May 2011 12:09:05 -0700 (PDT)
Local: Tues, May 10 2011 3:09 pm
Subject: #1342 Allow customization of MAX_SHOW_ALL_ALLOWED. Reopen or new ticket?
I'm looking at a five-year-old ticket here (http://
code.djangoproject.com/ticket/1342) that suggests MAX_SHOW_ALL_ALLOWED
in the admin be configurable. As of now it is hard coded at 200 in
contrib/admin/views/main.py .

The ticket is, in my opinion, somewhat erroneously marked as "fixed",
as someone pointed out 14 months ago. The patch that supposedly fixed
it is the one that added the list_per_page attribute; however, that
patch only addressed half of the issue (ability to configure results
per page) and not the other half related to the show all.

Clearly this is not an issue of overwhelming importance or I'd imagine
it would have already come up in the last five years. Be that as it
may, I have an important use case where I'd like to preserve
pagination but allow for a show_all link to appear, which can only be
accomplished gracefully by changing the MAX_SHOW_ALL_ALLOWED. It also
strikes me as bad form to hard code an arbitrary value like that
without providing any recourse to amend it.

First question is administrative -- should I reopen this old ticket or
start a new ticket?

Second question is how to approach the patch. Is it acceptable to move
this to global_settings under an "Admin" section at the bottom and
leave it undocumented? Given that it's already undocumented and there
are other settings in global_settings that are also undocumented, this
would seem to be the quickest approach that would hopefully ruffle the
fewest feathers. If that's not kosher, I'd be happy to contribute a
patch with full documentation if need be, or to take a different
approach, e.g. make this configurable at the site or model admin
level.

Third question, is there some reason this issue has not been fixed
before or should not be fixed? Mostly I just want to make sure this
issue has not been discussed before and some conclusion reached that
I'm not aware of (searched, but couldn't find anything).

If anyone has any thoughts regarding any of these questions I'd
appreciate hearing them. My main objective is to find the most direct
path to something that you guys will find acceptable. Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carl Meyer  
View profile  
 More options May 10 2011, 3:22 pm
From: Carl Meyer <c...@oddbird.net>
Date: Tue, 10 May 2011 14:22:07 -0500
Local: Tues, May 10 2011 3:22 pm
Subject: Re: #1342 Allow customization of MAX_SHOW_ALL_ALLOWED. Reopen or new ticket?
Hi Jim,

On 05/10/2011 02:09 PM, Jim D. wrote:

Agreed.

> First question is administrative -- should I reopen this old ticket or
> start a new ticket?

I think I'd open a new one, in this case, with reference to the existing
one.

> Second question is how to approach the patch. Is it acceptable to move
> this to global_settings under an "Admin" section at the bottom and
> leave it undocumented? Given that it's already undocumented and there
> are other settings in global_settings that are also undocumented, this
> would seem to be the quickest approach that would hopefully ruffle the
> fewest feathers. If that's not kosher, I'd be happy to contribute a
> patch with full documentation if need be, or to take a different
> approach, e.g. make this configurable at the site or model admin
> level.

I think having it configurable at (ideally) both the admin-site and
model-admin level (and having that documented) would be much better than
a new setting.

> Third question, is there some reason this issue has not been fixed
> before or should not be fixed? Mostly I just want to make sure this
> issue has not been discussed before and some conclusion reached that
> I'm not aware of (searched, but couldn't find anything).

You've searched the mailing list and the ticket tracker - that's due
diligence. I haven't been around as long as some, but I don't know of
any discussions about this. I think it's just been low priority and
overlooked.

> If anyone has any thoughts regarding any of these questions I'd
> appreciate hearing them. My main objective is to find the most direct
> path to something that you guys will find acceptable. Thanks.

Thanks for contributing!

Carl


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Re : Re: #1342 Allow customization of MAX_SHOW_ALL_ALLOWED. Reopen or new ticket?" by Mathieu AGOPIAN
Mathieu AGOPIAN  
View profile  
 More options May 12 2011, 12:47 am
From: Mathieu AGOPIAN <mathieu.agop...@gmail.com>
Date: Wed, 11 May 2011 21:47:01 -0700 (PDT)
Local: Thurs, May 12 2011 12:47 am
Subject: Re : Re: #1342 Allow customization of MAX_SHOW_ALL_ALLOWED. Reopen or new ticket?

Just to make sure i've understood the topic here: you need to change
MAX_SHOW_ALL_ALLOWED, but only for a specific model?

Otherwise you could just add something like that to, say, the root urlconf:

from django.contrib.admin.views import main as admin_views_main

admin_views_main.MAX_SHOW_ALL_ALLOWED = 1000

In the original ticket, there's no mention of this possibility, which I
believe is a possible solution to (part of) the problem.

Sorry for the noise if I missed the point.

Mathieu


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim D.  
View profile  
 More options May 12 2011, 9:56 am
From: "Jim D." <jim.dal...@gmail.com>
Date: Thu, 12 May 2011 06:56:01 -0700 (PDT)
Local: Thurs, May 12 2011 9:56 am
Subject: Re: Re : Re: #1342 Allow customization of MAX_SHOW_ALL_ALLOWED. Reopen or new ticket?
On May 11, 9:47 pm, Mathieu AGOPIAN <mathieu.agop...@gmail.com> wrote:

> Just to make sure i've understood the topic here: you need to change
> MAX_SHOW_ALL_ALLOWED, but only for a specific model?

> Otherwise you could just add something like that to, say, the root urlconf:

> from django.contrib.admin.views import main as admin_views_main

> admin_views_main.MAX_SHOW_ALL_ALLOWED = 1000

Thanks Mathieu. That's actually a fine little hack for overriding the
default site-wide. If I'd thought of that in the first place I
probably wouldn't have gone through the trouble of bringing up this
issue. :)

As it were, I ended up opening a ticket submitting a patch that
converts it into an configurable attribute on ModelAdmin:
http://code.djangoproject.com/ticket/15997

The patch I attached there also adds some documentation and test
coverage for the show all feature, which is lacking at the moment, so
hopefully it represents an improvement on what we have now.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »