[Zope3-dev] local-utility location and registration

Garanin Michael garanin at m-lan.ru
Tue Jul 5 15:21:19 EDT 2005


                                                                          
В Втр, 05.07.2005, в 19:22, Fred Drake пишет:
>                                                                           On 7/5/05, Jim Fulton <jim at zope.com> wrote:
> > It is not supported.  We really need to clean this area up
> > a lot.  I hope to make some progress on this in Zope 3.2.
> > There won't be any backward-compatibility code to support
> > unusual usages like yours.
> 
> I think we should be able to register things in content space as
> utilities, at least sometimes.  We have a reasonable example in the
> project I've been working on recently, though it could be done some
> other way as well.  (I think the cleanest way would be to have the
> registered objects live in content space for our application,
> however.)
> 
> 
>   -Fred

My own reasoning:
Q: That i have and that i want? 
A: My application is five content-folders: users(as principals),
village, people, contracts, classifiers. Each folder has access
interface (IUsersStorage, IVillageStorage ...). I do not want hard coded
folders name => I want to get this folders by interfaces (
zapi.getUtility(IVillageStorage) ). Therefore, i location my folders in
site-object and registration in sitemanager-object. 

Have i made a mistake?
Thanks!






More information about the Zope3-dev mailing list