| Age | Commit message (Collapse) | Author |
|
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.
|
|
truncated_unordered_list filter.
|
|
Added new constant django.db.models.fields.BLANK_CHOICE_LABEL for
an accessible and translatable blank choice label in forms.
Deprecated django.db.models.fields.BLANK_CHOICE_DASH constant.
Added the immediately deprecated transitional setting
USE_BLANK_CHOICE_DASH.
Co-Authored-By: Marijke Luttekes <mail@marijkeluttekes.dev>
|
|
Co-authored-by: Peter van der Does <peter@oneilinteractive.com>
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
ModelAdmin.list_editable.
Instead of going over all objects in a queryset and filtering
by user permissions, added skipping while saving the formset
so there is no need to refetch objects again.
|
|
|
|
|
|
|
|
pagination block.
Bug in 3f59711581bd22ebd0f13fb040b15b69c0eee21f.
|
|
ModelAdmin.list_editable.
Thanks Natalia Bidart, Jake Howard, and Markus Holtermann for reviews.
|
|
|
|
Regression in 4187da258fe212d494cb578a0bc2b52c4979ab95.
|
|
|
|
list_display.
When using related field lookups like 'parent__is_active' in list_display,
the admin now correctly detects if the final field is a BooleanField and
displays boolean icons instead of 'True'/'False' text.
Modified lookup_field() in django/contrib/admin/utils.py to retrieve the
final field from the path when traversing relations using LOOKUP_SEP (__),
allowing display_for_field() to properly handle BooleanFields.
|
|
layout.
|
|
|
|
TabularInline.
|
|
TabularInline.
|
|
Thanks Sarah Boyce and Jacob Walls for reviews.
Co-authored-by: Hrushikesh Vaidya <hrushikeshrv@gmail.com>
|
|
Visual regression in bc03f1064e10fa247a46d4e8a98ba9b26aa4790d.
|
|
|
|
icons in related-widget-wrapper.
|
|
Visual regression in 4187da258fe212d494cb578a0bc2b52c4979ab95.
|
|
containing only whitespace in admin.
|
|
Thanks Simon Charette for the idea.
|
|
Explicitly set the text color for the admin M2M widget to ensure
selected rows remain readable in browsers like Microsoft Edge and
Firefox when the widget was not focused.
|
|
admin.
Regression in b1ffa9a9d78b0c2c5ad6ed5a1d84e380d5cfd010.
|
|
|
|
the admin.
Thanks Antoliny for the review.
Regression in 4187da258fe212d494cb578a0bc2b52c4979ab95.
|
|
the admin.
The issue manifested when there were multiple relations and only some
of them participated in a filter_horizontal.
Regression in cd0479ff764272add5e0aba2afcf5649a241ca00.
|
|
Instead of casting non-text fields to CharField (which prevents index
usage), skip exact lookups when the search term fails
formfield.to_python().
This preserves index usage for valid searches while gracefully handling
invalid search terms by simply not including them in the query for that
field.
For multi-term searches like 'foo 123' on search_fields=['name', 'age__exact']:
- 'foo': invalid for age, so only name lookup is used
- '123': valid for both, so both lookups are used
This entails a slight increase in permissiveness for search terms that
can be normalized by formfield.to_python().
|
|
changelist.
Removed flex-wrap from .changelist-form-container and added min-width to the
main content container to ensure proper layout behavior.
Regression in 6ea331907996a51842da55c1f8d65eea7b367c7d.
|
|
FilteredSelectMultiple.
This patch adds support for <optgroup>s in FilteredSelectMultiple widgets.
When a popup returns a new object, if the source field contains optgroup
choices, the optgroup is now also included in the response data.
Additionally, this adds error handling for invalid source_model parameters
to prevent crashes and display user-friendly error messages instead.
Co-authored-by: Michael McLarnon <mmclar@gmail.com>
|
|
`changed_field_labels` is only needed if there are changes to log, so move its
calculation, including the somewhat costly `translation_override()`, inside the
conditional that checks for changes. Also avoid reading `form.changed_data`
when it’s already bound to `changed_data`.
co-authored-by: Rodolfo Becerra <44782644+rodolvbg@users.noreply.github.com>
|
|
Thanks Antoliny for the review.
|
|
|
|
Thanks Thibaud Colas for the review.
|
|
There was unresolved discussion regarding whether to set
ClearableFileInput.use_fieldset to True or False when use_fieldset was
introduced in Django 4.1, since the clear checkbox appears only
sometimes. Although using <fieldset> is likely desirable, since the
primary motivation in #35892 was just to improve markup in the admin,
and a deprecation path was not provided for general form usage, future
work is deferred to #36828.
Regression in 4187da258fe212d494cb578a0bc2b52c4979ab95.
Thanks Tim Graham, Antoliny, and David Smith for triage.
|
|
It isn't safe to set display: flex on <fieldset>, because on Safari this
interferes with display: block on child divs.
Thanks Paulo Coutinho for the report and Antoliny for the review.
Regression in 4187da258fe212d494cb578a0bc2b52c4979ab95.
|
|
Replaced instances of mark_safe('some string literal') with
SafeString to avoid the overhead of managing lazy objects.
Thanks Tim McCurrach for the idea and David Smith and Jacob Walls
for reviews.
|
|
Before, `context` and `content` were validated at compile time.
|
|
Thanks Sarah Boyce for the implementation idea.
|
|
Forwardport of 00575b79312c719a6b37035067095e2d679bb5d7 from stable/6.0.x.
|
|
Ideally, this will be reverted when an upstream solution is available for
https://github.com/python/cpython/issues/141560.
Thanks Patrick Rauscher for the report and Augusto Pontes for the
first iteration and test.
|
|
Thanks Eliana Rosselli and the Accessibility Team for the recommendation.
|
|
text.
|
|
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
|
|
Thanks Simon Charette for pair programming.
Co-authored-by: Nick Stefan <NickStefan12@gmail.com>
Co-authored-by: Akash Kumar Sen <71623442+Akash-Kumar-Sen@users.noreply.github.com>
Co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
Regression in bb145e2c47d71b7f68280c00ced727442d2effa2.
|