【发布时间】:2015-05-15 08:20:51
【问题描述】:
我正在使用谷歌云端点并希望能够扩展 User 类,以便对 get_current_user 的调用将返回具有我自己的额外属性的 AppUser 对象。
class AppUser(--?--): # what should i put here
gcm = ndb.StringProperty()
def send_notification(self):
# do something with gcm ...
pass
我怎样才能实现这样的事情?有没有更好的方法?
【问题讨论】:
标签: python google-app-engine google-cloud-datastore google-cloud-endpoints app-engine-ndb