Interface marker field for Archetypes
Project description
Introduction
This packages contains a single Archetypes field that can manage one or more marker interface on an object.
It is most often used with archetypes.schemaextender to add a field to a type which controls new optional behaviour.
Example
This example adds a new item to the settings fieldset for an object which controls an ICategory marker interface:
class FolderExtender(object): """Add a new 'category' field to all Archetypes based folder types. """ adapts(IBaseFolder) implements(ISchemaExtender) fields = [ InterfaceMarkerField("category", schemata = "settings", interfaces = (ICategory,), widget = BooleanWidget( title = _(u"label_category", default=u"Is this folder a category."), description = _(u"help_category", default=u"This should briefly explain what " u"categories are used for."), ), ), ] def __init__(self, context): self.context = context def getFields(self): return self.fields
Changelog
1.0 - November 6, 2008
Initial release [wichert]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for archetypes.markerfield-1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bc8cb4575851c17ea3372817262f4f1971657b8d8cb66b0949033cfb3de88e4 |
|
MD5 | 5d6106332ea46de08991fdfc1202fdaa |
|
BLAKE2b-256 | c6742020009ecedd051c9b9ced684671a92e64240ca5c5a46eb235b95ec183df |