[Grok-dev] schema_fields and form_fields

Martijn Faassen faassen at infrae.com
Fri Oct 20 07:00:58 EDT 2006


Philipp von Weitershausen wrote:
> Martijn Faassen wrote:
>> Hi there,
>>
>> I noticed that there is now a function called schema_fields to access 
>> the schema-level fields of class.
>>
>> I wonder whether this could be replaced with support for form_fields 
>> on the level of the view class. form_fields is a formlib concept that 
>> also allows the custom setting of widgets, like this:
>>
>> form_fields['my_field'].widget = MyWidget
> 
> that's actually .custom_widget = MyWidget

Oops, sorry, right, thanks!

>> I think there's also a way to get to the underlying schema field from 
>> the form_fields mapping.
> 
> form_fields['my_field'].field

Cool. So, if we expose form_fields on the template, is there still a use 
for the 'class_fields' helper function? Theuni?

Regards,

Martijn




More information about the Grok-dev mailing list