Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install plone.stringinterp

How to install plone.stringinterp

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install plone.stringinterp
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0.10 Available View build log
1.0.7 Available View build log
1.0.5 Available View build log
1.0.4 Available View build log
1.0.3 Available View build log
1.0.2 Available View build log
1.0.1 Available View build log
1.0 Available View build log
Windows (64-bit)
1.0.10 Available View build log
1.0.7 Available View build log
1.0.5 Available View build log
1.0.4 Available View build log
1.0.3 Available View build log
1.0.2 Available View build log
1.0.1 Available View build log
1.0 Available View build log
Mac OS X (10.5+)
1.0.10 Available View build log
1.0.7 Available View build log
1.0.5 Available View build log
1.0.4 Available View build log
1.0.3 Available View build log
1.0.2 Available View build log
1.0.1 Available View build log
1.0 Available View build log
Linux (32-bit)
1.0.10 Available View build log
1.0.7 Available View build log
1.0.5 Available View build log
1.0.4 Available View build log
1.0.3 Available View build log
1.0.2 Available View build log
1.0.1 Available View build log
1.0 Available View build log
Linux (64-bit)
1.0.10 Available View build log
1.0.7 Available View build log
1.0.5 Available View build log
1.0.4 Available View build log
1.0.3 Available View build log
1.0.2 Available View build log
1.0.1 Available View build log
1.0 Available View build log
 
License
GPL version 2
Lastest release
version 1.0.10 on May 31st, 2013

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 is 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 review_state_title

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.10 (2013-05-30)
  • Added review_state_title substitution variable [ichim-david]
1.0.9 (2013-05-26)
  • Added id substitution variable that works with content events and user events. [thomasdesvenain]
  • Email substitutions are not restricted to contentish anymore, so we can use them with user events. [thomasdesvenain]
1.0.8 (2013-05-23)
  • Added editor_emails substitution variable. [thomasdesvenain]
1.0.7 (2012-08-11)
  • Added parent_title substitution, which gets the title of the container. [thomasdesvenain]
  • Fixed user_fullname substitution : display user id if fullname is not set. [thomasdesvenain]
  • Do not restrict string interpolation to IContentish if not necessary. Fixes email content rule related with plone.app.discussion comments. Refs https://dev.plone.org/ticket/13047 [thomasdesvenain]
1.0.6 (2012-08-04)
  • Added parent_url substitution (the url of the object parent). [thomasdesvenain]
1.0.5 (2012-01-26)
  • Recursive get members works in a non wrapped context (when getting PloneGroups instead of GroupData from GroupTool) [thomasdesvenain]
  • Add MANIFEST.in [WouterVH]
1.0.4 - 2011-04-01
  • Added contributor_emails and reader_emails substitution variables. [thomasdesvenain]
1.0.3 - 2010-11-11
  • Fix a bug with member email substitutions when a user has been removed from acl_users. [rossp]
1.0.2 - 2010-09-20
  • Role email substitution works with user that have role through a group. [thomasdesvenain]
1.0.1 - 2010-09-15
  • Internationalized ${type} substitution. [thomasdesvenain]
  • Fixed: get emails for role works with local roles. [thomasdesvenain]
1.0 - 2010-07-18
  • Update license to GPL version 2 only. [hannosch]
1.0b1 - 2009-11-12
  • Initial release.

Subscribe to package updates

Last updated May 31st, 2013

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.