Thanks luciano,<br><br>two questions:<br><br>1) How do you run the zope
server in dev mode and how do you bind it to other port ?? I installed
grok with easy_install. I put write the line<br>&quot;devmode on&quot;<br>in parts/zopectl/zope.conf but nothing happend
<br><br>2) I have a simple app to add, edit and delete some content (an example found here <a href="http://wiki.zope.org/zope2/GrokExample" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://wiki.zope.org/zope2/GrokExample
</a>). I want to add a button in the forms to cancel the operation and redirect to other page without make any changes
<br><br>I don&#39;t understand how it works grok.AddForm and grok.EditForm.
It seems that it validate the form before the action take place, so i
can leave that page if there are errors in the form<br><br>Here is my add form
<br><br>class AddInvoice(grok.AddForm):<br>&nbsp;&nbsp;&nbsp; grok.context(InvoiceTracker)<br>&nbsp;&nbsp;&nbsp; form_fields = grok.AutoFields(Invoice)<br><br>&nbsp;&nbsp;&nbsp; @grok.action(&quot;Add invoice&quot;)<br>&nbsp;&nbsp;&nbsp; def add(self, **data):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoice = Invoice()
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.applyData(invoice, **data)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name = str(data[&#39;date&#39;]) + &#39;-&#39; + data[&#39;ffrom&#39;]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.context[name] = invoice<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.redirect(self.url(self.context))<br><br>

&nbsp;&nbsp;&nbsp; @grok.action(&quot;Cancel&quot;)<br>&nbsp;&nbsp;&nbsp; def cancel(self, **data):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.redirect(self.url(self.context))<br><br>and the edit<br><br>class EditInvoice(grok.EditForm):<br>&nbsp;&nbsp;&nbsp; grok.context(Invoice)<br>&nbsp;&nbsp;&nbsp; <a href="http://grok.name/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
grok.name</a>
(&#39;edit&#39;)<br>&nbsp;&nbsp;&nbsp; form_fields = grok.AutoFields(Invoice)<br><br>&nbsp;&nbsp;&nbsp; @grok.action(&quot;Save&quot;)<br>&nbsp;&nbsp;&nbsp; def save(self, **data):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.applyChanges(self,**data)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.redirect(self.url(self.context

))<br><br>&nbsp;&nbsp;&nbsp; @grok.action(&quot;Cancel&quot;)<br>&nbsp;&nbsp;&nbsp; def cancel(self, **data):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.redirect(self.url(self.context))<br><br><span class="gmail_quote">help please!!</span><br><br><div><span class="gmail_quote">
On 9/16/07, <b class="gmail_sendername">Luciano Ramalho</b> &lt;<a href="mailto:luciano@ramalho.org">luciano@ramalho.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 9/16/07, Santiago Videla &lt;<a href="mailto:santiago.videla@gmail.com">santiago.videla@gmail.com</a>&gt; wrote:<br>&gt; I&#39;m trying grok these days.<br>&gt;<br>&gt; I&#39;m wondering if there is an API somewhere, I couldn&#39;t find it yet
<br><br><br>Welcome, Santiago!<br><br>If you have Grok version 0.10 (the latest), start you app and take a<br>look at this URL in your machine:<br><br><a href="http://localhost:8080/docgrok/">http://localhost:8080/docgrok/
</a><br><br>Also, I recommend that you browse everything with a .txt extension in<br>the grok source tree. Most of them are doctest files trying out the<br>Grok API in different ways.<br><br>Soon you&#39;ll want to use the wider Zope 3 API also. The advice about
<br>looking into the .txt files also applies (even more in the case of<br>Zope 3, actually). And if you run a Zope 3 server in dev mode you can<br>read it&#39;s API docs locally at:<br><br><a href="http://localhost:8099/++apidoc++">
http://localhost:8099/++apidoc++</a><br><br>(the default port is 8080, but I got in the habit of running a Zope 3<br>server just to read the docs, so I bind it to a different port).<br><br>Some of us in the Grok community think the entire Grok and Zope 3 API
<br>docs should be online, where Google would find it and where we could<br>contribute with comments and code snippets. This is one of the aims of<br>the upcoming Neandertal Grok sprint.<br><br>Cheers,<br><br>Luciano<br><br>
<br>On 9/16/07, Santiago Videla &lt;<a href="mailto:santiago.videla@gmail.com">santiago.videla@gmail.com</a>&gt; wrote:<br>&gt; Hi there,<br>&gt;<br>&gt; I&#39;m trying grok these days.<br>&gt;<br>&gt; I&#39;m wondering if there is an API somewhere, I couldn&#39;t find it yet
<br>&gt;<br>&gt; thanks in advace<br>&gt;<br>&gt; --<br>&gt; Santiago Videla<br>&gt;&nbsp;&nbsp;<a href="http://www.revolucionesweb.com.ar">www.revolucionesweb.com.ar</a><br>&gt;<br>&gt; Sigue la mata dando de que hablar siempre abajo y a la izquierda donde el
<br>&gt; pensamiento que se hace corazón resplandece con la palabra sencilla y<br>&gt; humilde que l@s tod@s somos.<br>&gt; _______________________________________________<br>&gt; Grok-dev mailing list<br>&gt; <a href="mailto:Grok-dev@zope.org">
Grok-dev@zope.org</a><br>&gt; <a href="http://mail.zope.org/mailman/listinfo/grok-dev">http://mail.zope.org/mailman/listinfo/grok-dev</a><br>&gt;<br>&gt;<br></blockquote></div><br><br clear="all"><br>-- <br>Santiago Videla
<br><a href="http://www.revolucionesweb.com.ar">www.revolucionesweb.com.ar</a><br><br>Sigue la mata dando de que hablar siempre abajo y a la izquierda donde el pensamiento que se hace corazón resplandece con la palabra sencilla y humilde que 
l@s tod@s somos.