谷歌AppEngine NDB的独特约束
ndbunq的Python项目详细描述
google appengine ndb的唯一约束条件
ndbunq使用 ndb钩子。
示例
烧瓶有完整的工作示例: https://github.com/vmihailenco/ndbunq-example/:
import ndbunq from google.appengine.ext import ndb class User(ndbunq.Model): username = ndb.StringProperty(required=True) class Meta: # username is guaranteed to be unique unique = (('username',),)