Introduction
Provides ${id} style string interpolation using named adapters to look up variables. This is meant to provide a trivially simple template system for clients like plone.app.contentrules.
To interpolate a string in context, just follow the pattern:
from plone.stringinterp.interfaces import IStringInterpolator
IStringInterpolator(context)("Here is the title: ${title}")
Substitution of variables that are part of the Dublin Core are provided with the package. To provide additional subsitutions, just provide a named adapter implementing interfaces.IStringSubstitution for your context. The adapter name is used for the lookup.
Dependencies
Dependencies are all in the CMF* namespace, so this theoretically useful outside Plone. It does use the ‘plone’ identifier for the message factory.
Implemented Substitutions
All Content
url
Minimal Dublin Core
title description type (content type)
Workflow Aware
review_state
Dublin Core
creators contributors subject format (mime type) language rights identifier
Catalogable Dublin Core
Everything should be in long local time format
created effective expires modified
Member / Group Information for roles on content
owner_emails reviewer_emails manager_emails member_emails user_email
Current User Information
user_fullname user_id
Last Change (workflow or version) Information
change_comment change_title change_type change_authorid
Changelog
1.0 - 2010-07-18
Update license to GPL version 2 only. [hannosch]
1.0b1 - 2009-11-12
Initial release.
Metadata
Release files for plone.stringinterp 1.0
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 |
|---|---|---|---|---|
| plone.stringinterp-1.0.zip | 24.0 kB | Without provenance | Details for plone.stringinterp-1.0.zip |
Release files / plone.stringinterp-1.0.zip
| Download URL | plone.stringinterp-1.0.zip |
|---|---|
| Size | 24.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07ae26b6b6b1563ab61567177bc7f18950b091116233ceca6b706b8abccc1c4d
|
|
BLAKE2b-256 checksum How to use checksums |
6b535ecfbb44808d66fa4eb9eb35c68f7798c1dc97dac75bdb81e14a95952a10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for plone.stringinterp 1.0
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.