[Grok-dev] Trying to wrap my head around GROK

Sebastian Ware sebastian at urbantalk.se
Thu Mar 27 06:51:33 EDT 2008

I would recommend that you search the archives of this mailing list.  
Many of your questions have been posted here with detailed answers:


There are a couple of sample applications you will want to explore.  
The third page of the Evaluate track of the Grok website will give you  
some pointers:


The rest inline...

27 mar 2008 kl. 05.13 skrev want_to_grok_grok:

> Hi,
> I am trying to figure out how GROK works and how it can fit in my
> toolbox of webframeworks. Now I followed the tutorial and it was all
> good and dandy, well almost I hit two walls  : the automated forms for
> the  models ( how can I add css or other decorations to them ? and is
> it possible to have them partially rendered inside another view or am
> I stuck in doing some javascript iframes ? )

Yes, forms are rendered automatically but you can override this by  
adding a grok.view.

You can render these views from other page templates and if the view  
only renders the form-html, it can be inserted at the place of your  
choice. The page templates can be decorated any way you like.

> and then it was when I
> wanted to complexify the urls as to not have them  start from the app
> such as "/app/<entry name>" but as  "/app/contacts/<entry name >". Now
> I've found information on Traverse, but I don't seem to be able to get
> it to work. Can I create a container that will be inside the main
> application container ?  I tried the tutorial at :
> http://grok.zope.org/documentation/tutorial/navigating-to-transient-objects-tutorial/tutorial-all-pages
> but for some reason I get traversal errors and no means to get to the
> root app : "- __traceback_info__: (<natural.app.Index object at
> 0x37a5370>, 'badnum', [])
> TraversalError: (<natural.app.Index object at 0x37a5370>, 'badnum') "
> Is there a simple way to define URLs ? (I am thinking Django url.py or
> Pylons routes)

You will need to use a rewrite rule. Do a search for "rewrite" on the  
Grok website to find examples on how to setup Nginx or Apache.

> are there other tutorials like of how to make a blog or something with
> deep urls ?
> also how does one have grok answer to / and not /app ?

The third page of the Evaluate track of the Grok website will give you  
some pointers.

> Thank in advance for any help,
> Stephane
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev

mvh Sebastian

More information about the Grok-dev mailing list