[CMF-checkins] CVS: CMF - __init__.py:1.7
tseaver@digicool.com
tseaver@digicool.com
Sat, 26 May 2001 12:13:30 -0400 (EDT)
Update of /cvs-repository/CMF/CMFDefault
In directory korak.digicool.com:/tmp/cvs-serv26416/CMFDefault
Modified Files:
__init__.py
Log Message:
- Remove 'sneak preview' dependency on SkinnedFolder
--- Updated File __init__.py in package CMF --
--- __init__.py 2001/05/26 04:39:13 1.6
+++ __init__.py 2001/05/26 16:13:29 1.7
@@ -88,7 +88,13 @@
ADD_CONTENT_PERMISSION = 'Add portal content'
import Portal
-import Document, Link, NewsItem, File, Image, Favorite, SkinnedFolder
+import Document, Link, NewsItem, File, Image, Favorite
+try:
+ import SkinnedFolder
+ HAS_SKINNED_FOLDER=1
+except ImportError:
+ HAS_SKINNED_FOLDER=0
+
import Discussions, DiscussionItem
import PropertiesTool, MembershipTool, MetadataTool
import RegistrationTool, URLTool, DublinCore, DiscussionTool
@@ -134,9 +140,11 @@
, Link.Link
, Favorite.Favorite
, NewsItem.NewsItem
- , SkinnedFolder.SkinnedFolder
)
+if HAS_SKINNED_FOLDER:
+ contentClasses = contentClasses + ( SkinnedFolder.SkinnedFolder, )
+
contentConstructors = ( Document.addDocument
, File.addFile
, Image.addImage
@@ -193,14 +201,6 @@
icon='portal.gif')
utils.registerIcon(DefaultWorkflow.DefaultWorkflowDefinition,
'images/workflow.gif', globals())
-
- reg = Products.CMFCore.PortalFolder.addPortalTypeHandler
- reg( 'text/html', Document.Document )
- reg( 'text/plain', Document.Document )
- reg( 'image/png', Image.Image )
- reg( 'image/gif', Image.Image )
- reg( 'image/jpeg', Image.Image )
- reg( 'image/unknown', Image.Image )
context.registerHelp()
context.registerHelpTitle('CMF Default Help')