[Grok-dev] Re: Grok Widgets / Fields (Was Re: Re: [grok-br] Grok 1.0 and beyond)

Sebastian Ware sebastian at urbantalk.se
Sat Jan 12 07:34:12 EST 2008


I understand. This was the way I implemented it (only I wasn't aware  
that I could use a master template, I could really have use for  
that!). One exception though, I generated the actual form code using a  
[tal:replace] calling a python method. The reason I did it this way  
was becuase I knew that I would allways be able to tweak the python  
code to get it to do what I wanted.

I find that I am only comfortable with TAL calling Python methods to  
extract data. Once I try to do view logic it gets messy. I think this  
might be a case for many newbies too. TAL, simple as it is, is still  
another language and it isn't very good at reuse etc.

Maybe I fall into this becuase I am thinking

   Master template > Edit page template > Edit form (which can't be a  
page template...)
                   > View page template > View form

rather than

   Edit page template > Edit form template
   View page template > View form template

I realise that the second approach might in fact be a better way, even  
though I need to repeat some of the overall site HTML. I guess I need  
to explore this, becuase it might simplify some customisation that I  
have been reluctant to do.

Mvh Sebastian

12 jan 2008 kl. 01.40 skrev Martijn Faassen:
>
> To override it for your edit form is simple enough; just associate a  
> template for your edit form that does the work itself in its own  
> macro. No need to dive into the innards of grok.EditForm.
>
> If someone will promise me they'll help improve this (for instance  
> by writing a nice document about it), I'll send them code samples. :)
>
> Regards,
>
> Martijn
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list