Discuss / Python / 虽然github上代码没错,提醒一下index要加async 才对

虽然github上代码没错,提醒一下index要加async 才对

Topic source

Name勇哥

#1 Created at ... [Delete] [Delete and Lock User]

@get('/') async def index(request): users = yield from User.findAll() return { 'template': 'test.html', 'users': users }

完美佩恩

#2 Created at ... [Delete] [Delete and Lock User]

难道不要把yield from 改为 await么


  • 1

Reply