hi, i continue my user experimentation<br><span id="result_box" class="short_text"><span style="" title="">but I
was certainly not understood an important concept<br></span></span><span id="result_box" class="short_text"><span style="background-color: rgb(230, 236, 249); color: rgb(0, 0, 0);" title="">I tested the issue of
this faq :</span></span><br><a href="http://bluebream.zope.org/doc/1.0/faq.html#how-do-i-automatically-create-some-needed-object-at-application-startup">http://bluebream.zope.org/doc/1.0/faq.html#how-do-i-automatically-create-some-needed-object-at-application-startup</a><br>
it's ok, it create my object.<br><div id="tts_button" title="Écouter la traduction" style="display: block;" class=" "><object type="application/x-shockwave-flash" data="http://www.gstatic.com/translate/sound_player2.swf" id="tts_flash" height="18" width="18"><param value="http://www.gstatic.com/translate/sound_player2.swf" name="movie"><param value="sound_name=&sound_name_cb=_TTSSoundFile" name="flashvars"><param value="transparent" name="wmode"><param value="always" name="allowScriptAccess"></object></div>
<span id="result_box" class="short_text"><span style="" title="">but I can not find how use it with the </span></span><browser:page for="?????" /> in configure.zcml<br><br>Thanks for your help<br><br><br>below my files<br>
<br>##################<br># file : test_path.py #<br>##################<br>from zope.app.appsetup.interfaces import IDatabaseOpenedWithRootEvent<br>from zope.app.appsetup.bootstrap import getInformationFromEvent<br>import transaction<br>
from zope.component import adapter<br>from zope.container.btree import BTreeContainer<br><br>class MyContainer(BTreeContainer):<br> pass<br><br>@adapter(IDatabaseOpenedWithRootEvent)<br>def create_my_container(event):<br>
db, connection, root, root_folder = getInformationFromEvent(event)<br> if 'test_path_dir' not in root_folder:<br> root_folder['test_path_dir'] = MyContainer()<br> transaction.commit()<br> connection.close()<br>
#----------------------------------------------------------------------------------------------------<br>####################<br>
# file : myhello.py #<br>
####################<br><br><pre><span class="kn">from</span> <span class="nn">zope.publisher.browser</span> <span class="kn">import</span> <span class="n">BrowserView</span><br><br><span class="k">class</span> <span class="nc">HelloView</span><span class="p">(</span><span class="n">BrowserView</span><span class="p">):</span><br>
<br> <span class="k">def</span> <span class="nf">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span><br> <span class="k">return</span> <span class="s">"Hello World!"</span><br>
<br></pre>####################<br># file : configure.zcml #<br>####################<br><configure<br> xmlns="<a href="http://namespaces.zope.org/zope">http://namespaces.zope.org/zope</a>"<br> xmlns:browser="<a href="http://namespaces.zope.org/browser">http://namespaces.zope.org/browser</a>"<br>
i18n_domain="mydomain"><br><br> <include file="securitypolicy.zcml" /><br><pre><browser:page<br> for="???????????????????????????" <!-- here i don't know what i have to write to have <a href="http://localhost:8080/test_path_dir/hello">http://localhost:8080/test_path_dir/hello</a> --><br>
name="hello"<br> permission="zope.Public"<br> class=".myhello.HelloView"<br> /></pre><br> <subscriber handler=".spectacles.create_my_container" /><br> <br> <browser:defaultView<br>
for="zope.container.interfaces.IContainer"<br> name="index"<br> /><br><br><br> <include package=".welcome" /><br></configure><br>