[Erp5-report] r12206 - /erp5/trunk/products/ERP5/Document/PDFDocument.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jan 22 16:29:29 CET 2007
Author: bartek
Date: Mon Jan 22 16:29:26 2007
New Revision: 12206
URL: http://svn.erp5.org?rev=12206&view=rev
Log:
added index_html for standardisation
Modified:
erp5/trunk/products/ERP5/Document/PDFDocument.py
Modified: erp5/trunk/products/ERP5/Document/PDFDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/PDFDocument.py?rev=12206&r1=12205&r2=12206&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/PDFDocument.py (original)
+++ erp5/trunk/products/ERP5/Document/PDFDocument.py Mon Jan 22 16:29:26 2007
@@ -66,13 +66,14 @@
)
- def getTargetFile(self,format):
- '''
- we need to make our own, because Photo's methods are not
- sufficient (we have to zip etc)
- '''
- if not self.hasConversion(format = format):
+ def index_html(self, REQUEST, RESPONSE, format, force=0):
+ """
+ Returns data in the appropriate format
+ """
+ mime = 'image/'+format.lower()
+ if force or not self.hasConversion(format = format):
self.setConversion(self._makeFile(format), 'application/zip', format=format)
+ RESPONSE.setHeader('Content-Type', 'application/zip')
return self.getConversion(format = format)
def _makeFile(self,format):
More information about the Erp5-report
mailing list