Skip to main content

Interface marker field for Archetypes

Project description


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.


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.

    fields = [
                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


1.1 - 2011-04-07

  • Extracted a non-schemaextender version of the field to its own class. [hannosch]
  • PEP8 cleanup. [hannosch]

1.0 - 2008-11-06

  • Initial release [wichert]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for archetypes.markerfield, version 1.1
Filename, size File type Python version Upload date Hashes
Filename, size (8.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page