[Erp5-report] r37104 ivan - in /erp5/trunk/products/ERP5/Document: Document.py Image.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 14 09:42:51 CEST 2010


Author: ivan
Date: Wed Jul 14 09:42:50 2010
New Revision: 37104

URL: http://svn.erp5.org?rev=37104&view=rev
Log:
Move to an abstract class as these constants are usefull for other sub classes.

Modified:
    erp5/trunk/products/ERP5/Document/Document.py
    erp5/trunk/products/ERP5/Document/Image.py

Modified: erp5/trunk/products/ERP5/Document/Document.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Document.py?rev=37104&r1=37103&r2=37104&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Document.py [utf8] Wed Jul 14 09:42:50 2010
@@ -65,11 +65,18 @@ VALID_ORDER_KEY_LIST = ('user_login', 'c
 # these property ids are unchangable
 FIXED_PROPERTY_IDS = ('id', 'uid', 'rid', 'sid')
 
+# XXX: move to an easier to configure place (System Preference ?)
 VALID_TEXT_FORMAT_LIST = ('text', 'txt', 'html', 'base_html',
                           'stripped-html')
 
 VALID_IMAGE_FORMAT_LIST = ('jpg', 'jpeg', 'png', 'gif', 'pnm', 'ppm', 'tiff')
 
+DEFAULT_DISPLAY_ID_LIST = ('nano', 'micro', 'thumbnail',
+                            'xsmall', 'small', 'medium',
+                            'large', 'large', 'xlarge',)
+
+DEFAULT_QUALITY = 75
+
 class SnapshotMixin:
   """
     This class provides a generic API to store in the ZODB

Modified: erp5/trunk/products/ERP5/Document/Image.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Image.py?rev=37104&r1=37103&r2=37104&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Image.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Image.py [utf8] Wed Jul 14 09:42:50 2010
@@ -44,7 +44,7 @@ from Products.ERP5Type import Permission
 from Products.ERP5Type.Utils import fill_args_from_request
 from Products.ERP5.Document.File import File
 from Products.ERP5.Document.Document import Document, ConversionError,\
-                                                         VALID_TEXT_FORMAT_LIST
+                     VALID_TEXT_FORMAT_LIST, DEFAULT_DISPLAY_ID_LIST, DEFAULT_QUALITY, _MARKER
 from os.path import splitext
 from OFS.Image import Image as OFSImage
 from OFS.Image import getImageInfo
@@ -52,16 +52,8 @@ from zLOG import LOG, WARNING
 
 # import mixin
 from Products.ERP5.mixin.text_convertable import TextConvertableMixin
-
 from Products.CMFCore.utils import getToolByName
 
-DEFAULT_DISPLAY_ID_LIST = ('nano', 'micro', 'thumbnail',
-                            'xsmall', 'small', 'medium',
-                            'large', 'large', 'xlarge',)
-
-DEFAULT_QUALITY = 75
-
-_MARKER = []
 class Image(TextConvertableMixin, File, OFSImage):
   """
     An Image is a File which contains image data. It supports




More information about the Erp5-report mailing list