class ESCompactLicenseSerializer(BaseESSerializer, CompactLicenseSerializer): translated_fields = ('name', ) def __init__(self, *args, **kwargs): super(ESCompactLicenseSerializer, self).__init__(*args, **kwargs) self.db_name = ESTranslationSerializerField() self.db_name.bind('name', self) def fake_object(self, data): # We just pass the data as the fake object will have been created # before by ESAddonSerializer.fake_version_object() return data
def __init__(self, *args, **kwargs): super(ESCompactLicenseSerializer, self).__init__(*args, **kwargs) self.db_name = ESTranslationSerializerField() self.db_name.bind('name', self)