[Grok-dev] The Mammoth-Herd Example

Sebastian Ware sebastian at urbantalk.se
Thu Sep 6 04:22:52 EDT 2007


Oh, sorry.

 From the error it would seem that you have a page template but no  
class inheriting from the grok.View with the same name. Might be a  
typo. To specifically state which template to use when rendering add...

    grok.template('name_of_template.pt')

Or just try removing the template to see what error you get then  
(should be something like "missing page template or render method")

Mvh Sebastian

6 sep 2007 kl. 09.55 skrev Claudia Liersch:

> HI! Thanks for your answer.
>> You need a page template with the same name as the class. You can  
>> find the page template bellow the code on the same page:
> My Classes are named (original from the example)
>
> class Herd(grok.Application, grok.Container):
> class HerdIndex(grok.View):
>
>> "The HTML of the default view for herds is rendered by the  
>> herdindex.pt template. By putting it in the herd_templates  
>> directory, it will be picked up automatically and associated with  
>> the view class in herd.py according to the name of the template  
>> file and the name of the view class:"
> Thats exactly how I understood it.
>> herd.py
>> herd_templates/
>> herd_templates/herdindex.pt
> These are exacly my files and folders.
>
> Thats why I cant understand the Error
>
> GrokError: Found the following unassociated template(s) when  
> grokking 'herd': herdindex.  Define view classes inheri
>
> ting from grok.View to enable the template(s).
>
> But it doesnt run???
> I put a ZIP-File with my project on http://atw.dyndns.org/dev/herd/
>
> Maybe somebody can find out my fault.
>
>



More information about the Grok-dev mailing list