[Zope-CMF] [dev] some small changes

yuppie y.2013 at wcm-solutions.de
Fri Jul 5 10:48:27 CEST 2013


Hi!


I plan to work on the following changes. Please let me know if you have
questions or objections.


Fix dotted names of CMF interfaces:
===================================

CMF defines many interfaces, so we added some submodules like _content
and _tools. This was meant as a transparent implementation detail, it's
recommended to import from interfaces, not from the submodules. But
unfortunately the full path shows up in several places, e.g. on the
Interfaces tab you see Products.CMFCore.interfaces._content.IFolderish
instead of Products.CMFCore.interfaces.IFolderish.

GenericSetup has a special _getDottedName() method that tries to find
the short version. This hides the issue in profile exports.

AFAICS this could be fixed by setting __module__ explicitly for each
interface, e.g. for IFolderish

    __module__ = 'Products.CMFCore.interfaces'

Is this the right approach or will this cause new trouble?


Add 2 new portal types for member areas in CMFDefault:
======================================================

- 'MemberArea' will be a special folder type that uses the normal Portal
Folder class, but a different factory that replaces parts of the
createMemberArea() method. And a different default view that replaces
the 'index_html' Document currently added by createMemberArea().

- 'Members' will be a special folder type that uses the normal Portal
Folder class, but limits sub-items to 'MemberArea' objects and has a
special default view that replaces the 'index_html' DTML Method
currently added to the members folder.


Simplify content views in CMFDefault:
=====================================

- remove registration and lookup of "schema adapters" (e.g.
DocumentSchemaAdapter, LinkSchemaAdapter). Use these adapters directly
in getContent().

- rename '@@view.html' to '@@view', '@@properties.html' to
'@@properties' and so on. This allows to remove some method aliases.


Cheers,

    Yuppie



More information about the Zope-CMF mailing list