プロパティでを使用して、dbモデルクラスのプロパティ名を最適化しようとしname
ています。
元。
class terminals(db.Model):
location_code = db.StringProperty()
terminal_code = db.StringProperty(default='')
start_invoice_no = db.IntegerProperty(indexed=False, default=1, name='sin')
next_invoice_no = db.IntegerProperty(indexed=False)
last_doc_details = db.TextProperty(default='{}')
端末でのクエリ:
terminal_qry = db.Model(terminals).all()
起こっていることをdbにうまく入れます。しかし、私がこのクエリオブジェクトをシリアル化しようとしている間。
serializers.serialize('json', [terminal_qry])
エラーを次のように発生させます。
AttributeError: 'terminals' object has no attribute 'sin'
誰かがこれを言うことができますか、ここでどこが間違っていましたか?
よろしく。