[Zope-CMF] Re: [CMF-checkins] SVN: CMF/branches/1.5/C CMFSetup: added support for configuring content type registry.

Stefan H. Holek stefan at epy.co.at
Fri Oct 14 12:22:21 EDT 2005


Right, so at what point is the content-type-registry supposed to be  
added now? Plone Site creation breaks after this checkin with:

   File "/Users/zope/plonehd/Products/CMFCore/utils.py", line 83, in  
getToolByName
     raise AttributeError, name
AttributeError: content_type_registry

Thanks,
Stefan


On 14. Okt 2005, at 05:50, Tres Seaver wrote:

> Modified: CMF/branches/1.5/CMFDefault/Portal.py
> ===================================================================
> --- CMF/branches/1.5/CMFDefault/Portal.py    2005-10-13 21:01:27  
> UTC (rev 39122)
> +++ CMF/branches/1.5/CMFDefault/Portal.py    2005-10-14 03:50:12  
> UTC (rev 39123)
> @@ -278,30 +278,6 @@
>              fti = FactoryTypeInformation(**t)
>              tool._setObject(t['id'], fti)
>
> -    def setupMimetypes(self, p):
> -        p.manage_addProduct[ 'CMFCore' ].manage_addRegistry()
> -        reg = p.content_type_registry
> -
> -        reg.addPredicate( 'link', 'extension' )
> -        reg.getPredicate( 'link' ).edit( extensions="url, link" )
> -        reg.assignTypeName( 'link', 'Link' )
> -
> -        reg.addPredicate( 'news', 'extension' )
> -        reg.getPredicate( 'news' ).edit( extensions="news" )
> -        reg.assignTypeName( 'news', 'News Item' )
> -
> -        reg.addPredicate( 'document', 'major_minor' )
> -        reg.getPredicate( 'document' ).edit( major="text", minor="" )
> -        reg.assignTypeName( 'document', 'Document' )
> -
> -        reg.addPredicate( 'image', 'major_minor' )
> -        reg.getPredicate( 'image' ).edit( major="image", minor="" )
> -        reg.assignTypeName( 'image', 'Image' )
> -
> -        reg.addPredicate( 'file', 'major_minor' )
> -        reg.getPredicate( 'file' ).edit( major="application",  
> minor="" )
> -        reg.assignTypeName( 'file', 'File' )
> -
>      def setupWorkflow(self, p):
>          wftool = getToolByName(p, 'portal_workflow', None)
>          if wftool is None:
> @@ -336,7 +312,6 @@
>
>          self.setupTypes(p, PortalFolder.factory_type_information)
>          self.setupTypes(p, Topic.factory_type_information)
> -        self.setupMimetypes(p)
>          self.setupWorkflow(p)
>
>      def create(self, parent, id, create_userfolder):

--
Anything that happens, happens.  --Douglas Adams




More information about the Zope-CMF mailing list