source: WAeUP_SRP/trunk/skins/waeup_upload/download_data.py @ 17421

Last change on this file since 17421 was 4525, checked in by Henrik Bettermann, 15 years ago

provide link for download import file

File size: 870 bytes
RevLine 
[4525]1## Script (Python) "download_data"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=
8##title=
9##
10# $Id: download_pending.py 3325 2008-03-12 14:06:44Z joachim $
11"""
12export xxx.csv
13"""
14request = context.REQUEST
15setheader = request.RESPONSE.setHeader
16
17name,data = context.getContent()['getData']()
18
19#setheader('Content-type', 'text/x-cvs')
20#setheader('Content-type','application/vnd.ms-excel')
21setheader('Content-type','text/semicolon-seperated-values')
22setheader('Content-Disposition:', 'attachment; filename="%s.csv"' % name)
23setheader('Expires',  'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past
24setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1
25setheader('Cache-Control', 'post-check=0,pre-check=0')
26#setheader('Pragma', 'no-cache') # HTTP/1.0
27return data
Note: See TracBrowser for help on using the repository browser.