Python 谷歌应用引擎模型属性更新
当我尝试从以下位置更新模型时:Python 谷歌应用引擎模型属性更新,python,google-app-engine,web-applications,google-cloud-datastore,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_
class Submissions(ndb.Model):
title = ndb.StringProperty(required = True)
content = ndb.TextProperty(required = True)
created = ndb.DateTimeProperty(auto_now_add = True)
致:
我创建的新提交实体似乎没有新属性“dummy”。当我在SDK控制台->数据存储查看器中查看时,新实体仍然只有属性“title”、“content”和“created”
有人能解释为什么会发生这种情况吗?我很困惑 当您在代码中检查它们时,它们是否具有这些属性?如果是这样的话,那就正常了,无论出于什么原因,数据存储查看器都过时了。这只是一个额外的功能,如果你的应用程序按预期工作,不要太担心。谢谢你的回复。我不知道问题出在哪里,但当我将内容克隆到一个新的存储库中时,一切都很正常!
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)