[Zope-dev] Context priority as an alternative to configuration directive overrides

Chris Withers chris at simplistix.co.uk
Fri Dec 3 05:41:15 EST 2010


On 02/12/2010 08:15, Malthe Borch wrote:
> I always found configuration overrides (e.g. ZCML's<includeOverrides>
> directive) to be difficult to manage and hard to get right.
>
> How about an alternative where you can put a priority on a
> configuration context like so:
>
>    <adapter zcml:priority="100" ... />

I'm -sys.maxint on priorities.

> Default priority would be 0, traditional overrides get the maximum
> priority. ZTK components might then all be at the default priority,
> making it trivial to add a preferred component in a custom setup.

I'd much prefer it to just be an "order of execution" thing, the nyou 
have total and flexible control. Combined with some logging about why 
something is as it is and you have your solution.

The current includeOverrides stuff is a bit of a hack...

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope-Dev mailing list