DT
Size: a a a
DT
Z
DT
Z
se
se
DT
Z
Z
DT
se
А
DT
А
А
manufacturer: 'str'
manufacturer: {title: 'Производитель', value: ''}Как я понимаю, у него просто много if в React и ему каждый раз приходиться переводить.
RD
manufacturer: 'str'
manufacturer: {title: 'Производитель', value: ''}Как я понимаю, у него просто много if в React и ему каждый раз приходиться переводить.
А
RD
RD
manufacturer = serializers.SerializerMethodField(required=False, read_only=True)
def get_manufacturer(self, instance):
return {'title': 'Производитель', 'value': instance.manufacturer}
to_representation
def to_representation(self, instance):
ret = super().to_representation(instance)
ret['manufacturer'] = {'title': 'Производитель', 'value': instance.manufacturer}
return ret
Ю
manufacturer: 'str'
manufacturer: {title: 'Производитель', value: ''}Как я понимаю, у него просто много if в React и ему каждый раз приходиться переводить.