Пример #1
0
 def get_name(self, obj):
     if is_en(self):
         return obj.en_name
     else:
         return obj.cn_name
Пример #2
0
 def get_name(self, obj):
     if common_serializers.is_en(self):
         name = obj.en_name
     else:
         name = obj.cn_name
     return name