Last change
on this file since 4078 was
3325,
checked in by joachim, 17 years ago
|
pending and errors can be downloaded,
line_nr of wrong record added
|
-
Property svn:keywords set to
Id
|
File size:
824 bytes
|
Line | |
---|
1 | ## Script (Python) "download_pending" |
---|
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 | """ |
---|
12 | export xxx.pending |
---|
13 | """ |
---|
14 | request = context.REQUEST |
---|
15 | setheader = request.RESPONSE.setHeader |
---|
16 | |
---|
17 | name,data = context.getContent()['getPending']() |
---|
18 | |
---|
19 | #setheader('Content-type', 'text/x-cvs') |
---|
20 | #setheader('Content-type','application/vnd.ms-excel') |
---|
21 | setheader('Content-type','text/semicolon-seperated-values') |
---|
22 | setheader('Content-Disposition:', 'attachment; filename="%s.csv"' % name) |
---|
23 | setheader('Expires', 'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past |
---|
24 | setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1 |
---|
25 | setheader('Cache-Control', 'post-check=0,pre-check=0') |
---|
26 | #setheader('Pragma', 'no-cache') # HTTP/1.0 |
---|
27 | return data |
---|
Note: See
TracBrowser for help on using the repository browser.