| Age | Commit message (Collapse) | Author |
|
The existing note that is shown to the users when entering a time value
from a different timezone than the server's timezone was not descriptive
enough and led to confusion. This commit updates the note to explicitly
state that the user should enter times in the server's timezone.
|
|
non-editable instances.
Added formset that excludes objects for which
user has no permission for POST formset as well.
Fixed regression test: the test was not simulating
real behaviour properly. By providing full form
data for the post request we skipped the part
where the user was actually limited in permissions
and only modified some of the rows.
Improved tests by getting rid of obj.id % 2
approach for granting permissions per object
for users, since it is not the safest.
Instead granting permissions simply by 'alive'
parameter, which is simpler and more stable.
Bug in 84db026228413dda4cd195464554d51c0b208e32.
|
|
|
|
Thank you Mar Bartolome and Tim Schilling for reviews.
|
|
Thanks Olivier Dalang, Tim McCurrach, Sarah Boyce, and Mar Bartolome for reviews.
|
|
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.
|
|
For use in checking user permissions via has_perm().
Co-authored-by: 사재혁 <jaehyuck.sa.dev@gmail.com>
|
|
ModelAdmin.list_editable.
Thanks Natalia Bidart, Jake Howard, and Markus Holtermann for reviews.
|
|
Edit permissions were still checked as part of ordinary form validation,
but because GenericInlineModelAdmin overrides get_formset(), it lacked
InlineModelAdmin's dynamic DeleteProtectedModelForm.has_changed() logic
for checking permissions server-side, leaving the add case unaddressed.
This change reimplements the relevant part of InlineModelAdmin.get_formset().
Thanks N05ec@LZU-DSLab for the report, and Natalia Bidart,
Markus Holtermann, and Simon Charette for reviews.
|
|
|
|
Regression in 4187da258fe212d494cb578a0bc2b52c4979ab95.
|
|
alogin/alogout().
Regression in 31a43c571f4d036827d4fd7a5f615591637dc1be.
|
|
|
|
non-PostgreSQL databases.
|
|
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.
|
|
|
|
get_placeholder_sql.
The lack of ability of the get_placeholder call chain to return SQL and
parameters separated so they can be mogrified by the backend at execution time
forced implementations to dangerously interpolate potentially user controlled
values.
The get_placeholder_sql name was chosen due to its proximity to the previous
method, but other options such as Field.as_sql were considered but ultimately
rejected due to its different input signature compared to Expression.as_sql
that might have lead to confusion.
There is a lot of overlap between what Field.get_db_prep_value and
get_placeholder_sql do but folding the latter in the former would require
changing its return signature to return expression which is a way more invasive
change than what is proposed here.
Given we always call get_db_prep_value it might still be an avenue worth
exploring in the future to offer a publicly documented interface to allow field
to take an active part in the compilation chain.
Thanks Jacob for the review.
|
|
provided.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
manager.get_queryset() always returns freshly instantiated per-instance
QuerySet which doesn't need subsequent cloning.
Based on work originally done by Anssi Kääriäinen and Tim Graham.
|
|
referenced file.
|
|
Some languages use a different ordinal suffix for the number 1 than
for other values ending in 1 (e.g. 21, 31). Added a dedicated
pgettext context "ordinal is 1" to allow translators to handle
this distinction.
For example, in French, 1 is written as "1er" while 21, 31, etc. use
"21e", "31e", etc.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
Thanks Mariusz Felisiak for the review.
Co-authored-by: Nathan Gaberel <nathan@gnab.fr>
|
|
|
|
TabularInline.
|
|
TabularInline.
|
|
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
Thanks Sarah Boyce and Jacob Walls for reviews.
Co-authored-by: Hrushikesh Vaidya <hrushikeshrv@gmail.com>
|
|
Visual regression in bc03f1064e10fa247a46d4e8a98ba9b26aa4790d.
|
|
ContentTypes.
|
|
|
|
icons in related-widget-wrapper.
|
|
|
|
model_class() is None.
Updated ContentType.app_labeled_name to include the app_label in its string representation.
This removed ambiguity for content types whose models were not present in the current codebase
(for example, when multiple applications share the same database).
Adjusted related tests to reflect the new representation.
|
|
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.
|
|
deferred annotations.
Provide a wrapper for safe introspection of user functions on Python 3.14+.
Follow-up to 601914722956cc41f1f2c53972d669ddee6ffc04.
|