Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,7 @@ answer newbie questions, and generally made Django that much better:
Zeynel Özdemir <ozdemir.zynl@gmail.com>
Zlatko Mašek <zlatko.masek@gmail.com>
zriv <https://github.com/zriv>
Zubair Hassan <zubairhassan652@gmail.com>
<Please alphabetize new entries>

A big THANK YOU goes to:
Expand Down
8 changes: 7 additions & 1 deletion django/contrib/admin/templatetags/admin_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
PAGE_VAR,
SEARCH_VAR,
)
from django.core.exceptions import ObjectDoesNotExist
from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist
from django.db import models
from django.db.models.constants import LOOKUP_SEP
from django.template import Library
Expand Down Expand Up @@ -226,6 +226,12 @@ def link_in_col(is_first, field_name, cl):
empty_value_display = getattr(
attr, "empty_value_display", empty_value_display
)
# Find boolean fields on relations.
if f is None and isinstance(field_name, str) and LOOKUP_SEP in field_name:
try:
f = get_fields_from_path(cl.model, field_name)[-1]
except FieldDoesNotExist:
pass # e.g. __str__
if f is None or f.auto_created:
if field_name == "action_checkbox":
row_classes = ["action-checkbox"]
Expand Down
3 changes: 0 additions & 3 deletions django/contrib/admin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,6 @@ def lookup_field(name, obj, model_admin=None):
attr = getattr(attr, part, sentinel)
if attr is sentinel:
return None, None, None
# The final field is needed for displaying boolean icons.
if LOOKUP_SEP in name:
f = get_fields_from_path(opts.model, name)[-1]
value = attr
if hasattr(model_admin, "model") and hasattr(model_admin.model, name):
attr = getattr(model_admin.model, name)
Expand Down
2 changes: 1 addition & 1 deletion docs/intro/reusable-apps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ this. For a small app like polls, this process isn't too difficult.
:caption: ``django-polls/pyproject.toml``

[build-system]
requires = ["setuptools>=77.0.3"]
requires = ["setuptools>83"]
build-backend = "setuptools.build_meta"

[project]
Expand Down
9 changes: 9 additions & 0 deletions docs/releases/5.2.17.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
===========================
Django 5.2.17 release notes
===========================

*August 4, 2026*

Django 5.2.17 fixes one security issue with severity "high", two security
issues with severity "moderate", and one security issue with severity "low" in
5.2.16.
6 changes: 4 additions & 2 deletions docs/releases/6.0.8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
Django 6.0.8 release notes
==========================

*Expected August 4, 2026*
*August 4, 2026*

Django 6.0.8 fixes several bugs in 6.0.7.
Django 6.0.8 fixes one security issue with severity "high", two security issues
with severity "moderate", one security issue with severity "low", and several
bugs in 6.0.7.

Bugfixes
========
Expand Down
1 change: 1 addition & 0 deletions docs/releases/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ versions of the documentation contain the release notes for any later releases.
.. toctree::
:maxdepth: 1

5.2.17
5.2.16
5.2.15
5.2.14
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=77.0.3"]
requires = ["setuptools>=83"]
build-backend = "setuptools.build_meta"

[project]
Expand Down
3 changes: 3 additions & 0 deletions tests/admin_utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

class Site(models.Model):
domain = models.CharField(max_length=100)
parent = models.ForeignKey(
"self", models.CASCADE, related_name="children", blank=True, null=True
)

def __str__(self):
return self.domain
Expand Down
1 change: 1 addition & 0 deletions tests/admin_utils/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def simple_function(obj):
("test_from_model", article.test_from_model()),
("non_field", INSTANCE_ATTRIBUTE),
("site__domain", SITE_NAME),
("site__parent", None),
)

mock_admin = MockModelAdmin()
Expand Down
Loading