r13576 - in archetypes.markerfield/trunk: . archetypes/markerfield
"Hanno Schlichting" <[email protected]> Thu, 07 Apr 2011 09:54:09 +0000
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: hannosch
Date: Thu Apr 7 09:54:09 2011
New Revision: 13576
Modified:
archetypes.markerfield/trunk/CHANGES.txt
archetypes.markerfield/trunk/archetypes/markerfield/field.py
archetypes.markerfield/trunk/setup.py
Log:
Prepare archetypes.markerfield 1.1.
Modified: archetypes.markerfield/trunk/CHANGES.txt
==============================================================================
--- archetypes.markerfield/trunk/CHANGES.txt (original)
+++ archetypes.markerfield/trunk/CHANGES.txt Thu Apr 7 09:54:09 2011
@@ -1,9 +1,12 @@
Changelog
=========
-1.1 - Unreleased
+1.1 - 2011-04-07
----------------
+- Extracted a non-schemaextender version of the field to its own class.
+ [hannosch]
+
- PEP8 cleanup.
[hannosch]
Modified: archetypes.markerfield/trunk/archetypes/markerfield/field.py
==============================================================================
--- archetypes.markerfield/trunk/archetypes/markerfield/field.py (original)
+++ archetypes.markerfield/trunk/archetypes/markerfield/field.py Thu Apr 7 09:54:09 2011
@@ -5,14 +5,11 @@
from archetypes.markerfield.utils import removeMarkerInterface
-class InterfaceMarkerField(ExtensionField, BooleanField):
+class BaseInterfaceMarkerField(BooleanField):
"""Archetypes field to manage marker interface.
This is a boolean field which will set or unset one or more marker
interfaces on an object.
-
- This field can be used with archetypes.schemaextender. It is commonly used
- to manage optional behaviour for existing content types.
"""
def get(self, instance, **kwargs):
@@ -29,3 +26,9 @@
addMarkerInterface(instance, *self.interfaces)
else:
removeMarkerInterface(instance, *self.interfaces)
+
+
+class InterfaceMarkerField(ExtensionField, BaseInterfaceMarkerField):
+ """This field can be used with archetypes.schemaextender. It is commonly
+ used to manage optional behaviour for existing content types.
+ """
Modified: archetypes.markerfield/trunk/setup.py
==============================================================================
--- archetypes.markerfield/trunk/setup.py (original)
+++ archetypes.markerfield/trunk/setup.py Thu Apr 7 09:54:09 2011
@@ -26,8 +26,7 @@
install_requires=[
'setuptools',
'archetypes.schemaextender',
-# 'zope.component',
-# 'zope.interface',
-# 'Products.Archetypes',
+ 'Products.Archetypes',
+ 'zope.interface',
],
)
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev