Personal tools
Skip to content. | Skip to navigation
This package provides a queriable sources (vocabularies) that return PAS users, groups or principals (both users and groups). They are registered as named vocabularies, so you can do: class IMyInterface(Interface): users = schema.Choice(title=u"Users", vocabulary="plone.principalsource.Users") groups = schema.Choice(title=u"Groups", vocabulary="plone.principalsource.Groups") principals = schema.Choice(title=u"Principals", vocabulary="plone.principalsource.Principals") The underlying source (see source.py) implements the IQuerySource interface from z3c.formwidget.query. This means that it can be used for a query-select widget, including the one in plone.formwidget.autocomplete. A note about unicode The source attempts to make it safe to do a __contains__ check, a getTerm() lookup, and searches using unicode strings. This is somewhat constrained by the underlying plugins. In particular, the standard ZODBGroups plugin is incapable of searching for groups with unicode titles or ids, and returns a list of all groups if passed a unicode string. As such, the source forces all unicode strings used to search for groups to UTF-8 (searching for users is unaffected). Also, remember that tokens should be 7-bit ASCII strings. getTermByToken() is forgiving in that it silently encodes a unicode string to utf-8, but really you should only pass unicode to this method.
Tools for defining and querying complex relationships between objects. This product builds on and requires zc.relationship and also five.intid.
While being logged into the ZMI as an user with the Manager role visit /@@reload on your Zope application root via a browser. If your Zope is configured to listen on port 8080 on localhost this is: http://localhost:8080/@@reload If you get a Resource not found error, make sure you have loaded the configure.zcml file from this library and you really use the ZODB application root and not a Plone site as the base url. When you press the Reload Code button, all modules that have been changed since the last time they were loaded are reloaded. You'll get a status message telling you which modules have been reloaded. To reload all ZCML without a restart, press the 'Reload Code and ZCML' button. The action to perform is determined via a simple query string, so once you did a 'Reload Code' once, you can simply reload the browser page to execute the action once again. Caveats: There's some code structures which cannot be reloaded via the approach underlying this library. Plone portlets and content types are two examples of this. In general decorators will currently not always work.
plone.resource publishes directories of static files via the ZPublisher. These directories may be located either in the ZODB (as OFS folders and files), or on the filesystem. Each resource directory has a type and a name. When combined, these are used to traverse to the resource directory. For example: /++theme++mytheme/<subpath> /++sitelayout++mylayout/<subpath> /++templatelayout++mylayout<subpath>
This package contains resources for integrating ACE (http://ace.ajax.org/) into Plone, with a file manager that can edit plone.resource resource directories in the ZODB. ACE can be found under ++resource++plone.resourceeditor/ace/*. The file manager can be included in a view with the following in the header: <metal:block use-macro="resourceDirectory/@@plone.resourceeditor.filemanager/macros/resources" /> and the following in the body: <metal:block use-macro="resourceDirectory/@@plone.resourceeditor.filemanager/macros/filemanager"> In both of these cases, resourceDirectory should be an in-ZODB plone.resource resource directory instance.
REST stands for `Representational State Transfer`_. It is a software architectural principle to create loosely coupled web APIs. Most web APIs have a tight coupling between client and server. This makes them brittle and hard to change over time. It requires them not only to fully document every small detail of the API, but also write a client implementation that follows that specification 100% and breaks as soon as you change any detail. A hypermedia API just provides an entry point to the API that contains hyperlinks the clients can follow. Just like a human user of a regular website, that knows the initial URL of a website and then follows hyperlinks to navigate through the site. This has the advantage that the client just needs to understand how to detect and follow links. The URL and other details of the API can change without breaking the client.
This package provides primitives for turning content objects described by zope.schema fields into RFC (2)822 style messages, as managed by the Python standard library's email module. It consists of: * A marker interface IPrimaryField which can be used to indicate the primary field of a schema. The primary field will be used as the message body. * An interface IFieldMarshaler which describes marshalers that convert to and from strings suitable for encoding into an RFC 2822 style message. These are adapters on (context, field), where context is the content object and field is the schema field instance. * Default implementations of IFieldMarshaler for the standard fields in the zope.schema package. * Helper methods to construct messages from one or more schemata or a list of fields, and to parse a message and update a context object accordingly.
Plone specific extensions and fields for zope schematas.
plone.schemaeditor provides a through-the-web interface for modifying Zope 3 schemata (interfaces). Currently there is support for: * adding and removing fields * editing attributes of existing fields * reordering fields * renaming fields plone.schemaeditor only handles the actual schema editing. To be useful, it requires some integration code to take care of the following pieces: * traversing to a schema that is used as the context of the editor * persisting schema changes across Zope restarts See plone.app.dexterity (along with plone.dexterity and plone.supermodel) for one approach to this integration. The following field types (from zope.schema) are currently supported: * TextLine * Text * Int * Float * Bool * Password * Datetime * Choice (with simple list of values) * List of Choice (with simple list of values) Third-party packages can make additional field types available by registering new IFieldFactory utilities.
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.