[Mpuls-commits] r4006 - in base/trunk: . mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Oct 21 13:51:25 CEST 2010
Author: bh
Date: 2010-10-21 13:51:22 +0200 (Thu, 21 Oct 2010)
New Revision: 4006
Modified:
base/trunk/ChangeLog
base/trunk/mpulsweb/controllers/case_bundle.py
Log:
* mpulsweb/controllers/case_bundle.py
(CaseBundleController.exportAction): CSV export is now done with
zip files so change extension and mime-type accordingly.
Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog 2010-10-21 11:50:22 UTC (rev 4005)
+++ base/trunk/ChangeLog 2010-10-21 11:51:22 UTC (rev 4006)
@@ -1,5 +1,11 @@
2010-10-21 Bernhard Herzog <bh at intevation.de>
+ * mpulsweb/controllers/case_bundle.py
+ (CaseBundleController.exportAction): CSV export is now done with
+ zip files so change extension and mime-type accordingly.
+
+2010-10-21 Bernhard Herzog <bh at intevation.de>
+
* mpulsweb/lib/export.py (CSVContainer.write_zip_file): Add .csv
extension to the filenames in the zip file so that they're
recognized as CSV files by e.g. openoffice and other software.
Modified: base/trunk/mpulsweb/controllers/case_bundle.py
===================================================================
--- base/trunk/mpulsweb/controllers/case_bundle.py 2010-10-21 11:50:22 UTC (rev 4005)
+++ base/trunk/mpulsweb/controllers/case_bundle.py 2010-10-21 11:51:22 UTC (rev 4006)
@@ -509,8 +509,7 @@
elif exporttype == "XLS":
return self._download_data(export, "application/msexcel", "xls")
elif exporttype == "CSV":
- return self._download_data(export, "text/csv", "csv",
- content_encoding='Latin-1')
+ return self._download_data(export, "application/zip", "zip")
def _download_data(self, data, mime_type, extension, **extra):
disposition = 'attachment; filename="fallakten-export.%s"' % extension
More information about the Mpuls-commits
mailing list