Templates
This commit is contained in:
@@ -743,8 +743,12 @@ class Field(RegisterLookupMixin):
|
||||
if not getattr(cls, self.attname, None):
|
||||
setattr(cls, self.attname, DeferredAttribute(self.attname))
|
||||
if self.choices:
|
||||
setattr(cls, 'get_%s_display' % self.name,
|
||||
partialmethod(cls._get_FIELD_display, field=self))
|
||||
if not hasattr(cls, 'get_%s_display' % self.name):
|
||||
setattr(
|
||||
cls,
|
||||
'get_%s_display' % self.name,
|
||||
partialmethod(cls._get_FIELD_display, field=self),
|
||||
)
|
||||
|
||||
def get_filter_kwargs_for_object(self, obj):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user