summaryrefslogtreecommitdiff
path: root/django/contrib/admin/helpers.py
AgeCommit message (Collapse)Author
2025-08-19Fixed #35892 -- Supported Widget.use_fieldset in admin forms.antoliny0919
2025-04-17Fixed #35959 -- Displayed password reset button in admin only when user has ↵Sarah Boyce
sufficient permissions. This change ensures that the "Reset password" button in the admin is shown only when the user has the necessary permission to perform a password change operation. It reuses the password hashing rendering logic in `display_for_field` to show the appropriate read-only widget for users with view-only access.
2024-11-07Refs #23968 -- Removed unnecessary list comprehension in contrib.admin.helpers.John Parton
2024-05-22Fixed #35393 -- Added excluded pk as a hidden field to the inline admin.Willem Van Onsem
2024-05-22Fixed #35189 -- Improved admin collapsible fieldsets by using <details> ↵Marijke Luttekes
elements. This work improves the accessibility of the add and change pages in the admin site by adding <details> and <summary> elements to the collapsible fieldsets. This has the nice side effect of no longer requiring custom JavaScript helpers to implement the fieldsets' show/hide capabilities. Thanks to James Scholes for the accessibility advice, and to Sarah Boyce and Tom Carrick for reviews. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2024-02-26Fixed #35241 -- Cached model's full parent list.Adam Johnson
co-authored-by: Keryn Knight <keryn@kerynknight.com> co-authored-by: Natalia <124304+nessita@users.noreply.github.com> co-authored-by: David Smith <smithdc@gmail.com> co-authored-by: Paolo Melchiorre <paolo@melchiorre.org>
2023-02-16Fixed #34045 -- Improved accessibility of selecting items in admin changelist.Durval Carvalho
This adds "aria-label".
2022-10-31Used more augmented assignment statements.Nick Pope
Identified using the following command: $ git grep -I '\(\<[_a-zA-Z0-9]\+\>\) *= *\1 *[-+/*^%&|<>@]'
2022-08-09Removed unused InlineAdminForm.ordering_field().Mariusz Felisiak
Unused since its introduction in a19ed8aea395e8e07164ff7d85bd7dff2f24edca.
2022-04-06Fixed #33348 -- Changed ↵Baptiste Mispelon
SimpleTestCase.assertFormError()/assertFormsetErrors() to take form/formset. Instead of taking a response object and a context name for the form/formset, the two methods now take the object directly.
2022-02-15Refs #33348 -- Improved messages raised by ↵Baptiste Mispelon
SimpleTestCase.assertFormError()/assertFormsetErrors(). This makes messages use BaseFormSet/BaseForm.__repr__() instead of context, and adds the _assert_form_error() helper.
2022-02-14Refs #33348 -- Made SimpleTestCase.assertFormsetErrors() raise an error when ↵Baptiste Mispelon
form_index is too big.
2022-02-14Refs #33348 -- Made SimpleTestCase.assertFormError()/assertFormsetErrors() ↵Baptiste Mispelon
raise an error for unbound forms/formsets.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-09-18Fixed #33077 -- Fixed links to related models for admin's readonly fields in ↵Ken Whitesell
custom admin site.
2021-09-10Fixed #31867 -- Made TabularInline handling of hidden fields with view-only ↵antoinehumbert
permissions consistent with StackedInline.
2021-06-10Refs #24121 -- Added __repr__() to AdminForm, BlockContext, ↵saeedblanchette
BlockTranslateNode, and IncludeNode.
2020-10-08Fixed #31181 -- Added links to related models for admin's readonly fields.Julien Rebetez
2020-05-14Fixed #31524 -- Removed minified static assets from the admin.Jon Dufresne
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
2019-06-04Fixed #30520 -- Fixed crash of admin model inlines on custom fields without ↵Jones Ambrosi
labels.
2019-02-28Fixed #30221 -- Made label suffix of admin's read-only fields translatable.Etienne Chové
2018-11-20Fixed #29953 -- Added CSS class to column headers in tabular inlines.redodo
The class name is the same as one given to the fields in the change list.
2018-10-01Fixed CVE-2018-16984 -- Fixed password hash disclosure to admin "view only" ↵Carlton Gibson
users. Thanks Claude Paroz & Tim Graham for collaborating on the patch.
2018-08-20Fixed #29682 -- Fixed admin change form crash if a view-only model's form ↵Tim Graham
has an extra field.
2018-07-20Fixed #29523 -- Removed jQuery usage in DateTimeShortcuts.js & collapse.js.Claude Paroz
2018-05-18Fixed #29414 -- Restored form inputs on admin inlines when the user doesn't ↵Paulo Alvarado
have the change permission. Regression in 825f0beda804e48e9197fcf3b0d909f9f548aa47.
2018-05-16Fixed #8936 -- Added a view permission and a read-only admin.olivierdalang
Co-authored-by: Petr Dlouhy <petr.dlouhy@email.cz> Co-authored-by: Olivier Dalang <olivier.dalang@gmail.com>
2018-03-17Fixed #29184 -- Made TabularInline respect model form's Meta.labels and ↵Hasan Ramezani
help_texts.
2018-01-12Fixed #28996 -- Simplified some boolean constructs and removed trivial ↵Дилян Палаузов
continue statements.
2018-01-03Fixed #28984 -- Made assorted code simplifications.Tim Graham
2017-12-26Fixed #28930 -- Simplified code with any() and all().Дилян Палаузов
2017-11-30Fixed #28866 -- Made InlineAdminFormSet include InlineModelAdmin's Media ↵Vasiliy Bolshakov
before its formset's Media. This provides better backwards compatibility following refs #28377.
2017-07-20Fixed #28377 -- Made combining form Media retain relative asset order.Johannes Hoppe
Thanks Florian Apolloner, Mariusz Felisiak, and Tim Graham for reviews.
2017-06-12Fixed #27967 -- Fixed KeyError in admin's inline form with inherited ↵Paulo
non-editable pk. Thanks Robin Anupol for the initial report and workaround.
2017-03-04Refs #27795 -- Removed unneeded force_text callsClaude Paroz
Thanks Tim Graham for the review.
2017-02-07Converted usage of ugettext* functions to their gettext* aliasesClaude Paroz
Thanks Tim Graham for the review.
2017-02-04Refs #27656 -- Updated django.contrib docstring verb style according to PEP 257.Anton Samarchyan
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2017-01-17Refs #25135 -- Removed support for the contrib.admin allow_tags attribute.Tim Graham
Per deprecation timeline.
2016-11-25Fixed #27532 -- Deprecated Model._meta.has_auto_fieldAdam Chainz
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami
2016-09-27Fixed #27266 -- Allowed using assertFormError()/assertFormsetError() in ↵Tim Graham
admin forms and formsets. Thanks Diego Andrés Sanabria Martín for the report and review.
2016-09-13Fixed #27216 -- Corrected import location in admin deprecation messages.Jeff Willette
2016-09-03Replaced smart_* by force_* calls whenever possibleClaude Paroz
The smart_* version should only be used when a lazy string should keep its lazy status.
2016-08-25Replaced property() usage with decorator in several places.Berker Peksag
2016-06-21Fixed #26729 -- Allowed overriding a form field's label/help_text in ↵Paulo
Form.__init__() for TabularInline.