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>"devmode on"<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'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> grok.context(InvoiceTracker)<br> form_fields = grok.AutoFields(Invoice)<br><br> @grok.action("Add invoice")<br> def add(self, **data):<br> invoice = Invoice()
<br> self.applyData(invoice, **data)<br> name = str(data['date']) + '-' + data['ffrom']<br> self.context[name] = invoice<br> self.redirect(self.url(self.context))<br><br>
@grok.action("Cancel")<br> def cancel(self, **data):<br> self.redirect(self.url(self.context))<br><br>and the edit<br><br>class EditInvoice(grok.EditForm):<br> grok.context(Invoice)<br> <a href="http://grok.name/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
grok.name</a>
('edit')<br> form_fields = grok.AutoFields(Invoice)<br><br> @grok.action("Save")<br> def save(self, **data):<br> self.applyChanges(self,**data)<br> self.redirect(self.url(self.context
))<br><br> @grok.action("Cancel")<br> def cancel(self, **data):<br> 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> <<a href="mailto:luciano@ramalho.org">luciano@ramalho.org</a>> 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 <<a href="mailto:santiago.videla@gmail.com">santiago.videla@gmail.com</a>> wrote:<br>> I'm trying grok these days.<br>><br>> I'm wondering if there is an API somewhere, I couldn'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'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'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 <<a href="mailto:santiago.videla@gmail.com">santiago.videla@gmail.com</a>> wrote:<br>> Hi there,<br>><br>> I'm trying grok these days.<br>><br>> I'm wondering if there is an API somewhere, I couldn't find it yet
<br>><br>> thanks in advace<br>><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
<br>> pensamiento que se hace corazón resplandece con la palabra sencilla y<br>> humilde que l@s tod@s somos.<br>> _______________________________________________<br>> Grok-dev mailing list<br>> <a href="mailto:Grok-dev@zope.org">
Grok-dev@zope.org</a><br>> <a href="http://mail.zope.org/mailman/listinfo/grok-dev">http://mail.zope.org/mailman/listinfo/grok-dev</a><br>><br>><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.