Skip to main content

Manage configuration of browser views

Project description


This add-on does not provide new feature to Plone. It is intended to plone add-ons developers.

If you need to create a browser view with configuration this add-on will make your life easier.


  • Configuration providers
  • Configuration structure defined with zope.interface & zope.schema
  • Auto form to manage the configuration of the current view

Why doing this in an add-on

Because most of the time developers faced to this issue store data in the content type, or with annotation on context without trying to optimize, or without form, …

How it works

This add-ons define three components:

  • IConfigurableView
  • IConfigurationProvider
  • IConfigurationMutator

The main idea, is you just have to create an zope.interface to define settings schema and set this schema in the ‘settings_schema’ attributes of the view.

For example:

class IMyViewSettings(interface.Interface):
    width = schema.ASCIILine(title=u"Width",

    height = schema.ASCIILine(title=u"Height",

class MyView(ConfigurableBaseView):
    settings_schema = IMyViewSettings

    def width(self):
        return self.settings['width']

    def height(self):
        return self.settings['height']


This component is responsible to return settings. It has been implemented in different adapters

Provider (no named adapter): this provider load default values from the interface fields defaults values and it let other providers override values. It is an aggregation of all providers specified in the view throw the settings_providers attribute. Warning: The order is important, each settings are taken from the last provider which provide it.

‘’: this provider return values from (you have to register your settings_schema as records in registry.xml)

‘’: this provider return values stored in annotation on the context of the view.

‘’: TODO (not implemented yet)


This component is an extension of IConfigurationProvider with the write settings capabilities (throw its ‘set’ method).

‘’: this mutator store the configuration in the context of the view.


This component is implemented in a browserview you are supposed to inherits from in your own browser view.

The default behavior is to use ‘’ as mutator and the following providers:








1.0b3 (2011-08-01)

  • Optimization of storage: defaults are now based on all provider except [toutpt]
  • fix case where are not set (value was set to None) [toutpt]

1.0b2 (2011-06-30)

1.0b1 (2011-06-08)

  • Initial release

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for collective.configviews, version 1.0b3
Filename, size File type Python version Upload date Hashes
Filename, size collective.configviews-1.0b3.tar.gz (12.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page