2008-04-15
在GAE中生成全局序列号
关键字: gae python googleappengine
gae不能写文件,所以很多操作只能用datastore来实现了。
使用
class Sequence(db.Model):
@staticmethod
def next():
seq = Sequence()
seq.put()
id = seq.key().id()
seq.delete()
return id
使用
print Sequence.next()
- 02:08
- 浏览 (157)
- 评论 (0)
- 分类: GoogleAppEngine
- 发布在 Google App Engine 圈子
- 相关推荐







评论排行榜