adhocracy_core.resources package

Resource types mapped to sheets (OpenClosePrinciple), object hierarchy.

generate_random_name()[source]

Return random name (alpha/num).

add_resource_type_to_registry(metadata: adhocracy_core.interfaces.ResourceMetadata, config: pyramid.config.Configurator)[source]

Add the resource type specified in metadata to the content registry.

As generic factory the ResourceFactory is used. config.registry must have an content attribute with adhocracy_core.registry.ResourceRegistry to store the metadata.

class ResourceFactory(metadata: adhocracy_core.interfaces.ResourceMetadata)[source]

Bases: object

Basic resource factory.

Initialize self.

name_identifier = 'adhocracy_core.sheets.name.IName'
meta = None

ResourceMetadata.

includeme(config)[source]

Include resource types and subscribers.