Changeset 9176 for main/waeup.kofa/branches/uli-async-update/src
- Timestamp:
- 13 Sep 2012, 11:14:27 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/uli-async-update/src/waeup/kofa/browser/pages.py
r9169 r9176 1421 1421 string representing the exporter title used when triggering 1422 1422 the export job. 1423 1424 Calling this method also installs a JavaScript page reloader1425 that reloads the page after some time (1.5 secs), if there is1426 a running export that is not completed yet.1427 1428 The method caches results.1429 1423 """ 1430 1424 if self._running_exports is None: … … 1434 1428 def _getRunningExports(self): 1435 1429 result = self.context.get_export_jobs_status(self.user_id) 1436 uncompleted = [x for x in result if x[0] != 'completed']1437 #if len(uncompleted):1438 # page_reloader.need()1439 #else:1440 # page_not_reloader.need()1441 1430 return result 1442 1431 … … 1486 1475 result = open(path, 'rb').read() 1487 1476 acronym = grok.getSite()['configuration'].acronym.replace(' ','') 1488 filename = "%s%s.csv" % ( 1489 acronym, exporter.title.title().replace(' ','')) 1490 self.response.setHeader( 1491 'Content-Disposition:', 'attachment; filename="%s' % filename) 1477 filename = "%s_%s" % (acronym, os.path.basename(path)) 1492 1478 self.response.setHeader( 1493 1479 'Content-Type', 'text/csv; charset=UTF-8') 1480 self.response.setHeader( 1481 'Content-Disposition', 'attachment; filename="%s' % filename) 1494 1482 # remove job and running_exports entry from context 1495 1483 self.context.delete_export_entry(
Note: See TracChangeset for help on using the changeset viewer.