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

Martijn Faassen faassen at startifact.com
Tue Aug 5 13:36:06 EDT 2008


Martin Aspeli wrote:
>> I'd want a z3c.form-based view to behave like a grok view; so I expect 
>> url() to be there, and static to work, etc.
> Okay. I'm not sure how often you really need this, i.e. how often you make
> custom templates, but fair enough. The only thing here is that you need
> Grok-specific base classes for every base class that z3c.form has, or you
> need to use multiple inheritance.

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.

>>  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.



More information about the Grok-dev mailing list