r13318 - MoreFieldsAndWidgets/CompoundField/trunk/Products/CompoundField
"Jean-Michel FRANCOIS" <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: toutpt
Date: Thu Dec 2 16:21:56 2010
New Revision: 13318
Modified:
MoreFieldsAndWidgets/CompoundField/trunk/Products/CompoundField/EnhancedArrayWidget.py
MoreFieldsAndWidgets/CompoundField/trunk/Products/CompoundField/validators.py
Log:
update interface implementation. __implements__ is deprecated on plone3 and removed in plone4
Modified: MoreFieldsAndWidgets/CompoundField/trunk/Products/CompoundField/EnhancedArrayWidget.py
==============================================================================
--- MoreFieldsAndWidgets/CompoundField/trunk/Products/CompoundField/EnhancedArrayWidget.py (original)
+++ MoreFieldsAndWidgets/CompoundField/trunk/Products/CompoundField/EnhancedArrayWidget.py Thu Dec 2 16:21:56 2010
@@ -27,7 +27,7 @@
from Products.CompoundField import config
##code-section module-header #fill in your manual code here
-from Products.Archetypes.ArchetypeTool import _guessPackage
+#from Products.Archetypes.ArchetypeTool import _guessPackage
from Products.Archetypes.ArchetypeTool import WidgetWrapper
from Products.CompoundField import config
from Products.CompoundField.utils import *
@@ -78,7 +78,7 @@
"""
# The following code is adapted from getWidgets in ArchetypeTool
atool = getToolByName(context, 'archetype_tool')
- package = _guessPackage(context.__module__)
+ package = None #_guessPackage(context.__module__)
type = context.portal_type
# create a false instance
Modified: MoreFieldsAndWidgets/CompoundField/trunk/Products/CompoundField/validators.py
==============================================================================
--- MoreFieldsAndWidgets/CompoundField/trunk/Products/CompoundField/validators.py (original)
+++ MoreFieldsAndWidgets/CompoundField/trunk/Products/CompoundField/validators.py Thu Dec 2 16:21:56 2010
@@ -24,11 +24,11 @@
# http://plone.org/products/compoundfield/issues/23
try:
- # Zope 2 interface (Plone 3 compatible)
- __implements__= (IValidator,)
- except:
- # Zope 3 interface (Plone 4 compatible)
+ # Zope 3 interface (Plone 3 compatible)
interface.implements(IValidator)
+ except:
+ # Zope 2 interface (Plone 2.5 compatible)
+ __implements__= (IValidator,)
name = 'compoundfieldvalidator'
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev