[Grok-dev] Re: Grok Widgets / Fields

Brandon Craig Rhodes brandon at rhodesmill.org
Thu Jan 10 09:53:57 EST 2008


"Luciano Ramalho" <luciano at ramalho.org> writes:

> The form generation class in Django produces only the HTML for the
> contents of the <form> element, making it easy to embed. In Grok,
> auto-generated forms use a template
> (src/grok/templates/default_edit_form.pt) which include the entire
> HTML, HEAD and BODY, making it hard to embed.

I suppose this is because of the way that METAL works - it allows
macro contents to be deeply embedded inside of other tags (HTML, BODY,
and so forth) as long as they're marked as the macro value way down
inside where the actual code lives that should be yanked out.  This
allows developers who are suspicious that, say, a form is broken, to
view it directly - since it has just enough HTML and HEAD around it to
induce a browser to read it - rather than only having the option of
seeing it render in the middle of everything else they have included
in a page.

-- 
Brandon Craig Rhodes   brandon at rhodesmill.org   http://rhodesmill.org/brandon


More information about the Grok-dev mailing list