Refs #24474 -- Changed AdminSite.empty_value_display property to an attribute.

This was implemented with a property getter and setter when introduced
in 0207bdd2d4.

There is nothing special occurring here though - a simple read from and
assign to the underlying private attribute.
This commit is contained in:
Nick Pope 2020-11-14 06:24:07 +00:00 committed by GitHub
parent aa53655e6e
commit 67a1ae68a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 9 deletions

View File

@ -52,7 +52,7 @@ class AdminSite:
enable_nav_sidebar = True enable_nav_sidebar = True
_empty_value_display = '-' empty_value_display = '-'
login_form = None login_form = None
index_template = None index_template = None
@ -180,14 +180,6 @@ class AdminSite:
""" """
return self._actions.items() 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): def has_permission(self, request):
""" """
Return True if the given HttpRequest has permission to view Return True if the given HttpRequest has permission to view