[Zope3-dev] Re: run-time adapter registration and un-registration
Jim Fulton
jim at zope.com
Tue Feb 13 06:14:58 EST 2007
On Feb 13, 2007, at 5:11 AM, Philipp von Weitershausen wrote:
> Chris,
>
> (wrong list, btw... such posts belong on zope3-users at zope.org)
>
>> I'd like to build a UI that allows a user to changing what
>> adapters (views in particular) are assigned to an interface
>> through a web interface.
>> The sounds like it's going to require runtime assigned and un-
>> assignment of adapters.
>> Has anyone tried this before?
>
> Well, we do it all the time with persistent, local components (not
> necessarily with adapters but with utilities).
The key is that we haven't done it (recently) with adapters, so this
is some virgin territory. I believe I've seen a report of a problem
with local adapter registrations but it's been lost in my old email.
Hopefully, whoever sent me the mail will chime in or, better yet,
submit a collector entry.
> I can't recommend manipulating the global registries at runtime
> because such changes would be lost after a restart. Volatile
> registries such as the glboal one are best populated during startup
> (by ZCML, grok, etc.) and then left alone.
Yup.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list