2👍
✅
You messed up your '
and "
:
response['Content-Disposition'] = 'attachment; filename="results'+str(date)+'.csv"'
This will work. I would suggest this though:
response['Content-Disposition'] = 'attachment; filename="results{}.csv"'.format(str(date))
Also consider using strftime.
Source:stackexchange.com