This release is a pre-release and may not be stable for production use.
Introduction
raptus.contenttemplates allows to provide templates to automate specific tasks. Templates are created by registering an adapter implementing the ITemplate interface for the context the template should be available.
Actions
All currently available actions are located at raptus.contenttemplates.actions, new actions may be created by implementing the IAction interface.
ActionChains
ActionChains are helpful if a list of actions have to be executed in the context of a newly created object. Let’s say one wants to create a document named test-document, mark it private and give read access to the user jsmith and write access to jdoe. The list returned by the template would look like this:
[ActionChain((
CreateContent('test-document', 'Document', {'title': 'Test Document'}),
WorkflowTransition('hide'),
AddLocalRole('jsmith', 'Reader'),
AddLocalRole('jdoe', 'Editor')
))]
ActionChains respect the context returned by actions and use it to execute the preceding action. Actions which create new content, return the newly created object as context. The ActionChain then uses this context to execute the next action.
FieldDataRetriever
FieldDataRetrievers allow to use a field of the provided form as an attribute for an action. If one would like to have the aforementioned template use a form providing the title for the document and have the id generated from that field. The template would have to provide the name for the form and the action list could look like this:
[ActionChain((
CreateContent(FieldDataRetriever('title'), 'Document'),
WorkflowTransition('hide'),
AddLocalRole('jsmith', 'Reader'),
AddLocalRole('jdoe', 'Editor')
))]
Changelog
1.0b3 (2013-12-18)
Changed import zope.app.publisher to zope.browsermenu
1.0b2 (2011-10-18)
Removed PTS utility for Plone >= 4
1.0b1 (2010-10-20)
First public release
Metadata
Release files for raptus.contenttemplates 1.0b3
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 |
|---|---|---|---|---|
| raptus.contenttemplates-1.0b3.zip | 20.2 kB | Without provenance | Details for raptus.contenttemplates-1.0b3.zip |
Release files / raptus.contenttemplates-1.0b3.zip
| Download URL | raptus.contenttemplates-1.0b3.zip |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3cc5d22fd9f01e8295596f70db49e203952d00723d2445776a11c9f463cbc8fa
|
|
BLAKE2b-256 checksum How to use checksums |
dfbc947e85425b6d2ab3108e04a12618f461b7ff252873115a98638e2efdc2f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for raptus.contenttemplates 1.0b3
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.