Changeset 9176 for main


Ignore:
Timestamp:
13 Sep 2012, 11:14:27 (12 years ago)
Author:
uli
Message:

Finish merge of trunk and async branch. CSV exports will be named
after the exporter used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-async-update/src/waeup/kofa/browser/pages.py

    r9169 r9176  
    14211421           string representing the exporter title used when triggering
    14221422           the export job.
    1423 
    1424         Calling this method also installs a JavaScript page reloader
    1425         that reloads the page after some time (1.5 secs), if there is
    1426         a running export that is not completed yet.
    1427 
    1428         The method caches results.
    14291423        """
    14301424        if self._running_exports is None:
     
    14341428    def _getRunningExports(self):
    14351429        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()
    14411430        return result
    14421431
     
    14861475        result = open(path, 'rb').read()
    14871476        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))
    14921478        self.response.setHeader(
    14931479            'Content-Type', 'text/csv; charset=UTF-8')
     1480        self.response.setHeader(
     1481            'Content-Disposition', 'attachment; filename="%s' % filename)
    14941482        # remove job and running_exports entry from context
    14951483        self.context.delete_export_entry(
Note: See TracChangeset for help on using the changeset viewer.