Recently I am working on plone 2 to plone 3 upgrading. The following codes I think is commonly used in many cases, that need to be change as following:
Old |
New |
from Products.CMFCore.CMFCorePermissions import AddPortalContent |
try: from Products.CMFCore.permissions import AddPortalContent except ImportError: from Products.CMFCore.CMFCorePermissions import AddPortalContent |
from Products.AddRemoveWidget.ComboBoxWidget import ComboBoxWidget |
from Products.Archetypes.Widget import SelectionWidget |
import Products.CMFCore import CMFCorePermissions |
try: # New CMF from Products.CMFCore import permissions as CMFCorePermissions except ImportError: # Old CMF from Products.CMFCore import CMFCorePermissions |
All text ComboBoxWidget |
Converted into SelectionWidget |
import Products.CMFCore.CMFCorePermissions as CMFCorePermissions |
try: # New CMF from Products.CMFCore import permissions as CMFCorePermissions except ImportError: # Old CMF from Products.CMFCore import CMFCorePermissions |
from Products.CMFCore.CMFCorePermissions import setDefaultRoles |
try: # New CMF from Products.CMFCore.permissions import setDefaultRoles except ImportError: # Old CMF from Products.CMFCore.CMFCorePermissions import setDefaultRoles |
I am expecting your contribution to add more like this type of changes during plone 2 to plone 3 upgrade.
Thanks,
Sakib
No comments:
Post a Comment