summaryrefslogtreecommitdiff
path: root/django/contrib/admin/checks.py
AgeCommit message (Collapse)Author
2026-04-22Fixed #10919 -- Added delete_confirmation_max_display to ModelAdmin.Rodrigo Vieira
The new ModelAdmin.delete_confirmation_max_display attribute allows limiting the number of related objects shown on the delete confirmation page. When the limit is reached, a "…and N more objects." message is shown. The feature relies on a new truncated_unordered_list template filter added to django.contrib.admin.templatetags.admin_filters. Thanks Jacob Tyler Walls for the review and guidance, Tobias McNulty for the report, and terminator14 for the solution suggested.
2026-01-12Fixed #36804 -- Fixed admin system check crash for missing models.Parth Paradkar
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-07-23Refs #36500 -- Shortened some long docstrings and comments.Mike Edmunds
Manually reformatted some long docstrings and comments that would be damaged by the to-be-applied autofixer script, in cases where editorial judgment seemed necessary for style or wording changes.
2025-07-23Removed double spaces after periods and within phrases.Sarah Boyce
2025-05-08Fixed #36363 -- Added field names to admin duplicated fields error hint.Eric Blum
2024-08-05Fixed #35628 -- Allowed compatible GeneratedFields for ↵John Parton
ModelAdmin.date_hierarchy.
2024-06-28Reverted "Fixed #35564 -- Improved readability of subclass identification."Sarah Boyce
This reverts commit f0d05a747f7a099e6c6bc58c42a787546d2212e7 due to a performance regression.
2024-06-27Fixed #35564 -- Improved readability of subclass identification.Jaap Roes
2024-02-21Fixed #35237 -- Merged system checks for admin actions.Adam Johnson
2024-02-05Fixed #10743 -- Allowed lookups for related fields in ModelAdmin.list_display.Tom Carrick
Co-authored-by: Alex Garcia <me@alexoteiza.com> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> Co-authored-by: Nina Menezes <https://github.com/nmenezes0>
2023-12-27Fixed #35056 -- Fixed system check crash on reverse m2m relations with ↵Mariusz Felisiak
related_name in ModelAdmin.filter_horizontal/vertical. Thanks Thomas Feldmann for the report. Regression in 107865780aa44914e21d27fdf4ca269bc61c7f01.
2023-07-07Refs #9602 -- Moved AlreadyRegistered/NotRegistered exceptions to ↵Mariusz Felisiak
django.contrib.admin.exceptions.
2023-07-07Fixed #9602 -- Added AdminSite.get_model_admin().Mariusz Felisiak
This allows retrieving an admin class for the given model class without using internal attributes.
2023-06-21Fixed #34345 -- Added system check for ManyToManyFields with intermediate ↵Hrushikesh
tables in ModelAdmin.filter_horizontal/vertical.
2023-06-05Fixed #34601 -- Added field name to check message for ↵nessita
ModelAdmin.readonly_fields. Co-authored-by: Rick van Hattem <wolph@wol.ph>
2023-05-02Fixed #34513 -- Added system check for relational fields in ↵Bakdolot
ModelAdmin.list_display.
2023-04-24Fixed #34481 -- Added system check for reverse related fields in ↵Bakdolot
ModelAdmin.list_display.
2023-01-18Refs #34233 -- Used str.removeprefix()/removesuffix().Mariusz Felisiak
2022-04-25Refs #2259 -- Disallowed primary keys in ModelAdmin.list_editable.siddhartha-star-dev
Refs #32728.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-03-04Fixed #32494 -- Adjusted system check for raw_id_fields to warn about ↵Hasan Ramezani
Field.attname.
2021-03-04Corrected messages of admin checks for invalid model field names.Hasan Ramezani
2020-07-30Bumped minimum isort version to 5.1.0.David Smith
Fixed inner imports per isort 5. isort 5.0.0 to 5.1.0 was unstable.
2020-05-25Fixed #31616 -- Added hint about middleware ordering for SessionMiddleware ↵Hasan Ramezani
admin check.
2020-05-14Fixed #31575 -- Added system check for admin sidebar request context ↵Jon Dufresne
processor dependency. Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
2020-01-29Used model's Options.label/label_lower where applicable.Mariusz Felisiak
2020-01-10Fixed #30980 -- Improved error message when checking uniqueness of admin ↵Adam Donaghy
actions' __name__. Thanks Keshav Kumar for the initial patch.
2019-07-10Fixed #30543 -- Fixed checks of ModelAdmin.list_display for fields ↵Hasan Ramezani
accessible only via instance. Co-Authored-By: Andrew Simons <andrewsimons@bubblegroup.com>
2019-04-26Fixed #30312 -- Relaxed admin check from django.contrib.sessions to ↵Aarni Koskela
SessionMiddleware subclasses.
2019-03-14Fixed #30237 -- Made Authentication/SessionMiddleware and ModelBackend admin ↵Herman S
checks allow subclasses.
2019-01-17Refs #27991 -- Made obj a required argument of ↵Tim Graham
InlineModelAdmin.has_add_permission(). Per deprecation timeline.
2018-11-20Fixed #29282 -- Prevented some admin checks from crashing with TypeError.Sanyam Khurana
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2018-10-02Fixed #29711 -- Added a system check for uniquness of admin actions' __name__.Przemysław Buczkowski
2018-08-20Fixed #29695 -- Added system checks for admin's app dependencies and ↵Rodrigo
TEMPLATES setting.
2018-08-20Removed redundant 'model' argument in admin checks.Jon Dufresne
2018-06-18Fixed #29419 -- Allowed permissioning of admin actions.Carlton Gibson
2018-06-14Refs #29428 -- Fixed admin check crash when using a query expression in ↵Tim Graham
ModelAdmin.ordering.
2018-04-13Fixed #29322 -- Made admin check all ModelAdmin fieldsets for duplicates.Matthias Kestenholz
2018-04-04Fixed #27991 -- Added obj arg to InlineModelAdmin.has_add_permission().Jon Dufresne
Thanks Vladimir Ivanov for the initial patch.
2017-12-13Fixed #28898 -- Corrected admin check to allow a OneToOneField in ↵Rodrigo Pinheiro Marques de Araújo
ModelAdmin.autocomplete_fields.
2017-12-11Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking.Nick Pope
2017-10-02Fixed #28490 -- Removed unused code in admin.E108 check.Hunter Richards
2017-09-18Fixed #14370 -- Allowed using a Select2 widget for ForeignKey and ↵Johannes Hoppe
ManyToManyField in the admin. Thanks Florian Apolloner and Tim Graham for review and contributing to the patch.
2017-06-02Removed useless hasattr() checks in ModelAdmin checks.Tim Graham
These attributes are defined on BaseModelAdmin and thus should always be there.
2017-05-27Fixed #28226 -- Replaced use of str.join() with concatenation.Tom
2017-04-26Replaced temporary lists used for passing arguments with iterables.Jon Dufresne
2017-03-27Refs #23919 -- Removed some Python 2 compatibility code and comments.Mads Jensen