views.py
from aiohttp import web
from aiohttp import web_fileresponse
async def index(request):
return web.Response(text='下载完成!')
def download(request):
return web_fileresponse.FileResponse('quandl_data.csv', headers={'Content-Disposition': 'attachment;filename="quandl_data.csv"'})
urls.py