私は、次のコードを試してみました、それが動作しませんでした:Google App Engineのデータストアのエントリをオブジェクトの辞書で更新することはできますか?
class SourceUpdate(webapp.RequestHandler):
def post(self):
id = int(self.request.get('id'))
source = Source.get_by_id(id)
for property in self.request.arguments():
if property != 'id':
source.__dict__[property] = self.request.get(property)
source.put()
self.redirect('/source')
私は必要なすべてのプロパティを掲示していますが、エントリが更新されず、エラーが表示されません。それを修正するには?
ところで
class Source(db.Model):
#some string properties