[Grok-dev] Question about using the grok.name('index')

Christian Klinger cklinger at novareto.de
Thu Jan 29 03:07:49 EST 2009


Hello

> In the Grok tutorial, the last example shows how to use grok directive to
> explicitly connect to model, and associate a view as the index view. While
> playing with the example code, I'm wondering how can I access the object
> through the url if I don't use grok.name('index'),
> 
> class EntryIndex(grok.View):
>     grok.context(Entry)
>     grok.name('index')
> ....
> 
> by removing the grok.name('index'), I know I'm supposed to use url such as
> /entryindex to access the Entry, but I can't work it out. 
> 

you have a grok.context(Entry). So I think your url is

/yourEntryobject/entryindex

hth chrisitan



More information about the Grok-dev mailing list