【发布时间】:2015-03-13 00:54:18
【问题描述】:
我在 SQLAlchemy 中有以下属性:
@property
def serialize(self):
return {
'name' : self.name,
'description' : self.description,
'id' : self.id,
'price' : self.price,
'course' : self.course,
}
对于JSON,我只是使用jsonify(),对于XML,我该怎么做?
【问题讨论】:
标签: python xml python-2.7 flask