From 67a1ae68a833358e4b5bf2677e3f9f5719443bea Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Sat, 14 Nov 2020 06:24:07 +0000 Subject: [PATCH] Refs #24474 -- Changed AdminSite.empty_value_display property to an attribute. This was implemented with a property getter and setter when introduced in 0207bdd2d4157c542c981264c86706b78ca246e9. There is nothing special occurring here though - a simple read from and assign to the underlying private attribute. --- django/contrib/admin/sites.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py index 861ddd9b26..5b2472bc6f 100644 --- a/django/contrib/admin/sites.py +++ b/django/contrib/admin/sites.py @@ -52,7 +52,7 @@ class AdminSite: enable_nav_sidebar = True - _empty_value_display = '-' + empty_value_display = '-' login_form = None index_template = None @@ -180,14 +180,6 @@ class AdminSite: """ return self._actions.items() - @property - def empty_value_display(self): - return self._empty_value_display - - @empty_value_display.setter - def empty_value_display(self, empty_value_display): - self._empty_value_display = empty_value_display - def has_permission(self, request): """ Return True if the given HttpRequest has permission to view