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.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]
Metadata
Release files for archetypes.markerfield 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| archetypes.markerfield-1.1.zip | 8.0 kB | Without provenance | Details for archetypes.markerfield-1.1.zip |
Release files / archetypes.markerfield-1.1.zip
| Download URL | archetypes.markerfield-1.1.zip |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8efaf3d55856851be93cf849dd74fdfee11b2c93afe48fd1eb21264c7e8b90bd
|
|
BLAKE2b-256 checksum How to use checksums |
488eb00fd926b2f38209f5574e09c6e19a3803ee0d7b6621fd9e36e9d8860b1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for archetypes.markerfield 1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.