Iain Duncan wrote:

> Hi folks, I'm working on breaking out a project into bits, including
> some in bfg, some in pylons, and an abstract model that lives in it's
> own middleware. What I want to have happen is for all parts to share one
> zca registry, but my experiments so far are turning up naught. Some
> questions:
> - how would I get at the site manager from within the bfg code? I tried 
> getGlobalSiteManager, but it doesn't seem to turn up anything when I ask
> the gsm for registeredAdapters, even though I put them in there
> - would it be possible somehow to use the same zcml from my abstract
> model? If so, how would one go about creating a registry manually from a
> given zcml file? 

I'm not sure how these two questions relate to each other, so I'll just have to 
answer literally: to create a registry and populate it....

... nevermind, I was going to put it here but it's pointless.  There's no 
method of a registry that just loads a ZCML file, like.. you know.. would be 
absolutely reasonable.  So you have to call this function named something like 
"execute", but "execute" doesn't actually take a registry argument, so you have 
to do this override bullshit with "zope.hookable" to make it find the "right" 
registry, then unhook it later.  This dance is too absurd to describe without 
anaesthetics.  It's a truly pathetic design.

I typed a bunch of stuff here that basically boiled down to "homina homnia, 
don't do that" only because I don't know how to explain how to do it.  That 
doesn't mean you shouldn't do it, I just don't know how to tell you how to do 

> - would it be better to manually make my registry in some middleware and
> allow bfg to use it somehow? That seems to make the most sense to me
> from a design perspective, but I've no idea how I'd go about it.

Me either.

- C
Repoze-dev mailing list

Reply via email to