You are here: Home / LBN / Up2date / Plone and Zope / BastionLinux 19 / plone.stringinterp-1.2.1-1.lbn19.noarch

plone.stringinterp-1.2.1-1.lbn19.noarch

Package Attributes
RPM  plone.stringinterp-1.2.1-1.lbn19.noarch.rpm Architecture  noarch Size  124028 Created  2019/09/30 06:55:35 UTC
Package Specification
Summary Adaptable string interpolation
Group Application/Internet
License GPL version 2
Home Page http://pypi.python.org/packages/source/p/plone.stringinterp/plone.stringinterp-1.2.1.zip
Description

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 substitutions, just provide a named adapter implementing interfaces.IStringSubstitution for your context. The adapter name is used for the lookup.

You can also wrap your context with IContextWrapper adapter if you need to pass custom messages within your substitutions.

Requires
python-setuptools  
rpmlib(PayloadFilesHavePrefix)  
rpmlib(FileDigests)  
rpmlib(CompressedFileNames)  
/bin/sh  
rpmlib(PartialHardlinkSets)  
rpmlib(PayloadIsXz)  
Provides
plone.stringinterp
python2.7dist(plone.stringinterp)
python2dist(plone.stringinterp)
Obsoletes
plone.stringinterp-egginfo

Document Actions