[Zope-dev] plone.z3cform: ExtensibleForm should not change groups class attribute

Martin Aspeli optilude+lists at gmail.com
Fri Aug 14 07:33:09 EDT 2009


Gerhard Weis wrote:
> Hi,
> 
> Sorry if this is the wrong list, but as plone.z3cform is in the 
> zope-svn. I thought it may be Ok.
> 
> There is a small problem in plone.z3cform. The class 
> plone.z3cform.fieldsets.extensible.ExtensibleForm has a class attribute 
> groups, which is changed by the provided API methods. I don't think this 
> is intentional, becuase it makes it hard to recreate additional 
> instances of ExtensibleForm. The current behaviour works for forms which 
> use already groups, but for forms, where the EtensibleForm creates new 
> groups on the fly, it does not work. The attached patch fixes this. It 
> also includes a small addition to the Readme, which failes without the 
> patch applied, and runes clean with the patch applied.

Modify the class variable is certainly not intentional. It is supposed 
to copy it to an instance variable.

Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book



More information about the Zope-Dev mailing list