<div>BTreeContainer doesn&#39;t support site managers.</div>
<div>&nbsp;</div>
<div>Folder is a subclass of SiteManagerContainer which is a subclass of BTreeContainer.</div>
<div>&nbsp;</div>
<div>You can happily use Folder here.</div>
<div>&nbsp;</div>
<div>With regards,</div>
<div>- Shailesh</div>
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 7/8/08, <b class="gmail_sendername">Tim Cook</b> &lt;<a href="mailto:timothywayne.cook@gmail.com">timothywayne.cook@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I am building a platform where I want to initialize the ZODB (that will<br>be running under Zope) with three folders with sitemanagers.<br>
<br>If I use Folders like this:<br><br>if &#39;AR&#39; not in root[&#39;Application&#39;]:<br>&nbsp;&nbsp; root[&#39;Application&#39;][&#39;AR&#39;]=folder.Folder()<br>&nbsp;&nbsp; sm = LocalSiteManager(root[&#39;Application&#39;][&#39;AR&#39;])<br>
&nbsp;&nbsp; root[&#39;Application&#39;][&#39;AR&#39;].setSiteManager(sm)<br>&nbsp;&nbsp; transaction.commit()<br><br>it works great and I can then add initial objects to the folders.<br><br>But, these folder sill potentially contain tens of thousands of objects<br>
so I really want to use BTree Folders.&nbsp;&nbsp;But when I do this:<br><br>from zope.app.container.btree import BTreeContainer<br><br>... &lt;lots of other stuff&gt;<br><br>if &#39;AR&#39; not in root[&#39;Application&#39;]:<br>&nbsp;&nbsp; root[&#39;Application&#39;][&#39;AR&#39;]=BTreeContainer()<br>
&nbsp;&nbsp; sm = LocalSiteManager(root[&#39;Application&#39;][&#39;AR&#39;])<br>&nbsp;&nbsp; root[&#39;Application&#39;][&#39;AR&#39;].setSiteManager(sm)<br>&nbsp;&nbsp; transaction.commit()<br><br>I get this:<br><br>File<br>&quot;/home/tim/projects/ref_impl_python/TRUNK/oship/src/oship/atbldr/atbldr.py&quot;, line 78, in ?<br>
&nbsp;&nbsp; root[&#39;Application&#39;][&#39;AR&#39;].setSiteManager(sm)<br>AttributeError: &#39;BTreeContainer&#39; object has no attribute<br>&#39;setSiteManager&#39;<br><br>So BtreeContainers don&#39;t have a siteManager.<br><br>
I would like to OOBTree but I have been unable to even discern the<br>proper way to import it.<br><br>Thanks.<br><br>Tim<br><br><br><br><br><br>--<br>Timothy Cook, MSc<br>Health Informatics Research &amp; Development Services<br>
LinkedIn Profile:<a href="http://www.linkedin.com/in/timothywaynecook">http://www.linkedin.com/in/timothywaynecook</a><br>Skype ID == timothy.cook<br>**************************************************************<br>*You may get my Public GPG key from&nbsp;&nbsp;popular keyservers or&nbsp;&nbsp; *<br>
*from this link <a href="http://timothywayne.cook.googlepages.com/home*">http://timothywayne.cook.googlepages.com/home*</a><br>**************************************************************<br><br>_______________________________________________<br>
Zope3-users mailing list<br><a href="mailto:Zope3-users@zope.org">Zope3-users@zope.org</a><br><a href="http://mail.zope.org/mailman/listinfo/zope3-users">http://mail.zope.org/mailman/listinfo/zope3-users</a><br><br><br></blockquote>
</div><br>