Groups
Groups
Sign in
Groups
Groups
kay-users
Conversations
About
Send feedback
Help
How to create a downloadable csv file on GAE using KAY Framework?
37 views
Skip to first unread message
Aki Tanaka
unread,
Jun 12, 2013, 9:09:41 PM
6/12/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to kay-...@googlegroups.com
Hi,
I would like to create a downloadable csv file which allow user to click on the link to download it.
I found a related question on stackoverflow
http://stackoverflow.com/questions/2767910/google-app-engine-python-download-file
But it uses webapp framework.
Can anybody help me?
Thanks
Paolo Casciello
unread,
Jun 14, 2013, 6:14:58 AM
6/14/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to kay-...@googlegroups.com
Hi Aki,
Kay uses the Werkzeug's Response class (here for reference:
http://werkzeug.pocoo.org/docs/wrappers/#werkzeug.wrappers.BaseResponse
)
So the response object has a .headers attribute which is of Headers type:
http://werkzeug.pocoo.org/docs/datastructures/#werkzeug.datastructures.Headers
you can add the headers via response.headers.add('Content-type', 'text/csv')
and so on..
Hope this helps!
Bye,
Paolo
Reply all
Reply to author
Forward
0 new messages