#15997 closed Cleanup/optimization (fixed)
Allow customization of MAX_SHOW_ALL_ALLOWED in admin views
Reported by: | Jim Dalton | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Jim Dalton, adehnert | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
(This is essentially a re-opening of #1342, which was marked as fixed despite the fact that the ability to customize MAX_SHOW_ALL_ALLOWED
was never actually implemented. Some discussion here.)
In a nutshell, MAX_SHOW_ALL_ALLOWED
is currently fixed at 200 and hard coded in contrib/admin/views/main.py
. Minimally, this should be configurable in some way shape or form outside of modifying Django source code. Ideally, we should be able to modify the value on a per site and per model basis.
I will be working on a patch to address this. Any comments or suggestions are welcome.
Some discussion here.
Attachments (2)
Change History (10)
comment:1 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 14 years ago
Cc: | added |
---|---|
Has patch: | set |
by , 14 years ago
Attachment: | max_show_all_in_model_admin.diff added |
---|
follow-up: 4 comment:3 by , 13 years ago
Cc: | added |
---|---|
UI/UX: | unset |
Does anything need to be done to make this patch acceptable?
comment:4 by , 13 years ago
Replying to adehnert:
Does anything need to be done to make this patch acceptable?
The proposed patch looks good and it contains documentation and tests. However, it doesn't apply cleanly to trunk so at the very least it needs to be updated and reposted here. Then one needs to review the patch more closely to verify that it fixes the issue properly and that the tests are correct and pass. If that's the case, then the ticket can be moved to the "Ready for checkin" stage, otherwise a comment should be left here explaining how the patch could be improved. You can find more detailed info on the various ticket triage stages here: https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#triage-stages
comment:5 by , 13 years ago
Clean patched attached.
@adenhert please do feel free to examine the patch, and if it looks good mark as ready_for_checkin. Otherwise, you can comment here if you spot any issues and I'll take a look and hopefully address them.
by , 13 years ago
Attachment: | max_show_all_in_model_admin.v2.diff added |
---|
Okay, patch attached.
ModelAdmin
,list_max_show_all
, with a default value of 200, which for all intents and purposes replacesMAX_SHOW_ALL_ALLOWED
.ChangeList
tests which exercise the show all behavior (previously, no such tests existed).ChangeList
.