0
나는 attribute_of
및 spyne 2.10 (매우 기쁘다)으로 놀고있다. 의는 다음과 같은 모델을 생각해 보자attribute_of의 이름 사용자 정의
<product id="00000000-0000-0000-0000-000000000000">
<edition edition_id="00000000-0000-0000-0000-000000000000">My edition</edition>
</product>
어떻게 <edition id="..."/>
같은 결과를 edition_id
의 이름을 사용자 정의하려면 다음과 같은 결과를 얻을 수
class Product(ComplexModel):
id = complex.XmlAttribute(primitive.Uuid)
edition = primitive.Unicode
edition_id = complex.XmlAttribute(primitive.Uuid, attribute_of='edition')
를?
나는 다음 주에 이것에 시간을 할애 할 것이다. 감사. – kbec
안녕하세요, https://github.com/plq/spyne/blob/72665943092378a6d49460e21adeb95845dd4de5/examples/xml_utils.py#L78에서 어떻게 생각하는지 말해주세요. –