mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[5.0.x] Fixed #35606, Refs #34045 -- Fixed rendering of ModelAdmin.action_checkbox for models with a __html__ method.
Thank you Claude Paroz for the report. Regression in85366fbca7. Backport of182f262b15from main.
This commit is contained in:
committed by
Sarah Boyce
parent
fe9bf0cef5
commit
c3d3af8ea3
@@ -3,7 +3,7 @@ from django.contrib.auth.admin import UserAdmin
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.paginator import Paginator
|
||||
|
||||
from .models import Band, Child, Event, Parent, ProxyUser, Swallow
|
||||
from .models import Band, Child, Event, GrandChild, Parent, ProxyUser, Swallow
|
||||
|
||||
site = admin.AdminSite(name="admin")
|
||||
|
||||
@@ -53,6 +53,13 @@ class ChildAdmin(admin.ModelAdmin):
|
||||
return super().get_queryset(request).select_related("parent")
|
||||
|
||||
|
||||
class GrandChildAdmin(admin.ModelAdmin):
|
||||
list_display = ["name"]
|
||||
|
||||
|
||||
site.register(GrandChild, GrandChildAdmin)
|
||||
|
||||
|
||||
class CustomPaginationAdmin(ChildAdmin):
|
||||
paginator = CustomPaginator
|
||||
|
||||
|
||||
Reference in New Issue
Block a user