Skip to main content

System based on annotation to make a configurable browser view by Makina Corpus.

Project description

Introduction

Harlequin provide infrastructure to make configurable browser view without to have to deals with how the configuration data are stored. Most of the time developers faced to this issue store data in the model. This is bad because all instances have those data and do not necessary need it.

Your configuration view data are stored and your view can access to this configuration easily.

This module doesn’t provide any ‘user’ feature to Plone.

How to use it

You want to develop a browser view that need configuration ? Make your browser view inherits from collective.harlequin.browser.Harlequin (or implements IHarlequinView)

Next you can define your configuration with a zope.schema interface which inherits from collective.harlequin.forms.Schema

Next you have to make your z3cform with the configuration schema and inherits from collective.harlequin.forms.Form.

You have to attach the form to your browser view by override the method ‘harlequin_form’. Make it return the Page form wrapper class.

Next make your view available in the display drop down menu, and try by selecting it ! You get The form displayed, fill it and validate it, the job is made for you.

How it works

It override the setViewTemplate script, verify if the asked view is harlequin one. If it is the case it mark the view to display the configuration form.

z3cform is used to display the configuration form.

Configuration are stored with an adapter over the context. Two adapters are available:

  • use property manager.

  • use annotation.

For ATContTypes annotation will be used.

WARNING: the property manager is not working that much and is never used on a default Plone.

Credits

makinacom

Authors

Contributors

Changelog

1.0b2 (2010-05-28)

  • Nothing changed yet.

1.0b1 (2010-05-27)

  • 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.

Source Distribution

collective.harlequin-1.0b2.zip (32.9 kB view details)

Uploaded Source

File details

Details for the file collective.harlequin-1.0b2.zip.

File metadata

File hashes

Hashes for collective.harlequin-1.0b2.zip
Algorithm Hash digest
SHA256 7848c38a48512d4533cf8ede98ceab7dc73fc9c43f5d5ca3e30e01c64753b0f2
MD5 c5ec47902925b3cc62304a9a6992cc7f
BLAKE2b-256 a6ddc704864748fe72dd059d6c1e870aef0db8e0a63f4b790fd34c9382dbf4fc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page