On Wed, Feb 23, 2011 at 4:45 PM, Peter Hartmann <[email protected]>wrote:
> Hello, > I have a quick, simple question regarding pyramid_zcml package. What > will happen if, after loading a zcml config, I will load another one? > Will it completely override previous config, or only those directives > it contains itself, or will it spit a conflict(s)? > I can't answer what will happen there, but the recommended procedure is to load one master configure.zcml file that includes others. If you include a python package: <include package="foo" /> the parsing looks for a configure.zcml file in foo. If you want to override, you need to include differently to let the parsing know not to choke on conflicts: <includeOverrides file="local.zcml" /> If it's a matter of wanting to do something more in code depending on some conditional logic, you can also register components in the registry manually using the registry, which is useful for registering *objects* instead of modules or factories. Check out this guide for a good overview of manually manipulating the registry. Just don't forget that it's shared across all threads. http://www.muthukadan.net/docs/zca.html hth, iain -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
