[Grok-dev] Re: What would a megrok.z3cform (and a Zope2/plone.z3cform equivalent) look like?

Sylvain Viollon sylvain at infrae.com
Wed Aug 6 04:00:22 EDT 2008


On Tue, 05 Aug 2008 22:39:21 +0100
Martin Aspeli <optilude at gmx.net> wrote:

> Martijn Faassen wrote:
> > grok.View adds more goodies than just creating a custom template.
> > It has the very essential 'url' method. Anyway, I'd expect all
> > views, including forms, to be Grok views. We can't suddenly have a
> > major exception.
> Fair enough.
> >>>  This suggests to me the 
> >>> introduction of a new base classes for EditForm, AddForm etc in 
> >>> megrok.form anyway, which also helps answering the import
> >>> question.
> >> I think having to maintain a parallel base class hierarchy is a
> >> bit of a shame, and breaks existing z3c.form documentation in a
> >> way, but it's probably not so bad.
> > 
> > I think it cannot be sensibly avoided if we assume grok.View style 
> > behavior. For the other namespaces, we shouldn't start flattening 
> > things, I agree. Perhaps for convenience import things like
> > 'button' and 'field' into the megrok.form namespace too.
> +1
> btw, are we saying megrok.form, or megrok.z3cform?

   I think megrok.z3cform would be nice,

> Also, what would the Five/Zope 2 name be? five.grok.z3cform? 
> five.megrok.z3cform?

   So here like five.grok, we could make a five.grok.z3cform, if
setuptools let us do so.

   My experiences on plone.z3cform works quite well, so I could split
it to these two packages, if you want. I don't have that much of code
to make it working, but after I think we should implements some forms
and see how we want them to be implemented.

   As well, we can reuse some utilities from grokcore.formlib, for
instance when you to add automatically the attribute field on your form
(like for form_fields in formlib), so do we want to have a dependency
of megrok.z3cform to grokcore.formlib, or factor that out again ?
(I think that's strange to have one support for a form library relying
on the code of one other, people will use only one of them).

   As well, I would like to fix five.grok, add the missing dependency,
and add a simple formlib support it, I don't think here I need to make
a separate package for it (since formlib is in grokcore for grok


Sylvain Viollon -- Infrae
t +31 10 243 7051 -- http://infrae.com
Hoevestraat 10 3033GC Rotterdam -- The Netherlands
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20080806/a4290081/signature-0001.bin

More information about the Grok-dev mailing list