[Grok-dev] autoforms and derived interfaces
trollfot at gmail.com
Wed Jun 24 06:18:49 EDT 2009
This is maybe a bit off subject, but I dealt with this form/content/fields
matters in a package :
If you want to have a look, maybe we can share opinions and fiddle something
more interesting for both of us :)
2009/6/23 Jasper Spaans <j at jasper.es>
> The following code should speak for itself; is it supposed to work like
> this? (the reason for the constructor is that form_fields takes its value
> from IAction, which is not what I want as I'm adding/editting objects of
> type context.__class__, which might implement interfaces derived from
> trollfot on #grok mentioned that a use case for the current behaviour is
> when you want to prevent editing all of the attributes of an object.
> What's your opinion?
> class EditAction(grok.EditForm):
> def __init__(self, context, request):
> super(EditAction, self).__init__(context, request)
> self.form_fields = grok.AutoFields(context.__class__)
> Jasper Spaans
> Fox-IT Experts in IT Security!
> I www.fox-it.com
> Grok-dev mailing list
> Grok-dev at zope.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Grok-dev