Ticket #2310 (closed task: fixed)

Opened 9 years ago

Last modified 9 years ago

widget and fields classes registration via ZMCL

Reported by: gracinet Owned by: gracinet
Priority: P2 Milestone: CPS 3.5.2
Component: CPS (global) Version: 3.5.1
Severity: normal Keywords:
Cc:

Description

We're still registering widget and field classes via direct imports (typically from __init__) which trigger calls to the registry. That should be handled by CPS directives instead. The first, obvious, benefit is to stop thinking about potential import loops.

Then, this'll bring a bit more flexibility.

Change History

comment:1 Changed 9 years ago by gracinet

  • Status changed from new to closed
  • Resolution set to fixed

Done, and applied to widgets and fields defined by CPSSchemas itself (BasicWidgets, ExtendedWidgets, SearchWidgets) The ZCML registration is just a wrapper around widgetRegistry.register. It occurs later than registrations at import time

One immediate benefit : one can now move deprecated widgets to a separate module, register a new widget class for the same meta_type. Downstream products needing a deprecated widget can still use it (but not both) provided they override the configuration in ZCML.

Note: See TracTickets for help on using tickets.