Commit e3672238 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Minor fixes.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12193 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 547c9dc3
...@@ -34,6 +34,7 @@ from Products.CMFCore.WorkflowCore import WorkflowMethod ...@@ -34,6 +34,7 @@ from Products.CMFCore.WorkflowCore import WorkflowMethod
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5Type.Cache import CachingMethod from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5.Document.Document import Document from Products.ERP5.Document.Document import Document
from Products.ERP5.Document.Document import ConversionCacheMixin
from Products.ERP5Type.Base import Base from Products.ERP5Type.Base import Base
from Products.CMFDefault.File import File as CMFFile from Products.CMFDefault.File import File as CMFFile
from zLOG import LOG from zLOG import LOG
...@@ -53,7 +54,7 @@ def stripHtml(txt): # XXX-JPS to be moved to TextDocument ...@@ -53,7 +54,7 @@ def stripHtml(txt): # XXX-JPS to be moved to TextDocument
return txt return txt
class File(Document, CMFFile): class File(Document, CMFFile, ConversionCacheMixin):
""" """
A File can contain raw data which can be uploaded and downloaded. A File can contain raw data which can be uploaded and downloaded.
It is the root class of Image, OOoDocument (ERP5OOo product), It is the root class of Image, OOoDocument (ERP5OOo product),
......
...@@ -35,7 +35,6 @@ from Acquisition import aq_base ...@@ -35,7 +35,6 @@ from Acquisition import aq_base
from Products.CMFCore.WorkflowCore import WorkflowMethod from Products.CMFCore.WorkflowCore import WorkflowMethod
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5.Document.File import File from Products.ERP5.Document.File import File
from Products.ERP5.Document.Document import ConversionCacheMixin
from OFS.Image import Image as OFSImage from OFS.Image import Image as OFSImage
from OFS.Image import getImageInfo from OFS.Image import getImageInfo
from OFS.content_types import guess_content_type from OFS.content_types import guess_content_type
...@@ -55,7 +54,7 @@ defaultdisplays = {'thumbnail' : (128,128), ...@@ -55,7 +54,7 @@ defaultdisplays = {'thumbnail' : (128,128),
default_formats = ['jpg', 'jpeg', 'png', 'gif', 'pnm', 'ppm'] default_formats = ['jpg', 'jpeg', 'png', 'gif', 'pnm', 'ppm']
class Image(File, OFSImage, ConversionCacheMixin): class Image(File, OFSImage):
""" """
An Image is a File which contains image data. It supports An Image is a File which contains image data. It supports
various conversions of format, size, resolution through various conversions of format, size, resolution through
......
...@@ -52,6 +52,7 @@ Domain_getattr = Domain.inheritedAttribute('__getattr__') ...@@ -52,6 +52,7 @@ Domain_getattr = Domain.inheritedAttribute('__getattr__')
CACHE_KEY = 'web_site_aq_cache' CACHE_KEY = 'web_site_aq_cache'
DOCUMENT_NAME_KEY = 'web_section_document_name' DOCUMENT_NAME_KEY = 'web_section_document_name'
reserved_name_dict = { 'getApplicableLayout' : 1, reserved_name_dict = { 'getApplicableLayout' : 1,
'isWebMode' : 1,
'getLayout' : 1, 'getLayout' : 1,
'Localizer' : 1, 'Localizer' : 1,
'field_render' : 1, 'field_render' : 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment