mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-04 21:44:44 +00:00
Rename _get_val_from_obj to value_from_object
value_from_object has been in Django for a long time. _get_val_from_obj is deprecated
This commit is contained in:
parent
8a17aeb5a8
commit
d37d54e62e
2 changed files with 2 additions and 2 deletions
|
|
@ -119,7 +119,7 @@ class StreamField(with_metaclass(models.SubfieldBase, models.Field)):
|
|||
return super(StreamField, self).formfield(**defaults)
|
||||
|
||||
def value_to_string(self, obj):
|
||||
value = self._get_val_from_obj(obj)
|
||||
value = self.value_from_object(obj)
|
||||
return self.get_prep_value(value)
|
||||
|
||||
def get_searchable_content(self, value):
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class BaseField(object):
|
|||
def get_value(self, obj):
|
||||
try:
|
||||
field = self.get_field(obj.__class__)
|
||||
value = field._get_val_from_obj(obj)
|
||||
value = field.value_from_object(obj)
|
||||
if hasattr(field, 'get_searchable_content'):
|
||||
value = field.get_searchable_content(value)
|
||||
return value
|
||||
|
|
|
|||
Loading…
Reference in a new issue