Python google.appengine.ext.ndb 模块,toplevel() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用google.appengine.ext.ndb.toplevel()

项目:appbackendapi    作者:codesdk    | 项目源码 | 文件源码
def get(self):
        acct = Account.get_by_id(users.get_current_user().user_id())
        acct.view_counter += 1
        acct.put_async()  # Ignoring the Future this returns

        # ...read something else from Datastore...

        self.response.out.write('Content of the page')


# This is actually redundant, since the `get` decorator already handles it, but
# for demonstration purposes, you can also make the entire app toplevel with
# the following.