Google App Engine模型属性更新

时间:2017-02-25 09:08:25

标签: python google-app-engine web-applications google-cloud-datastore

当我尝试更新我的模型时:

class Submissions(ndb.Model):                                                                
    title = ndb.StringProperty(required = True)
    content = ndb.TextProperty(required = True)
    created = ndb.DateTimeProperty(auto_now_add = True)

为:

class Submissions(ndb.Model):                                                                
     title = ndb.StringProperty(required = True)
     content = ndb.TextProperty(required = True)
     dummy = ndb.IntegerProperty(default = 0)
     created = ndb.DateTimeProperty(auto_now_add = True)

我创建的新提交实体似乎没有新属性“dummy”。当我查看SDK控制台 - >数据存储查看器时,新实体仍然只有“标题”,“内容”和“已创建”属性。

有谁能说明为什么会这样?我很困惑!

0 个答案:

没有答案