Michael Pearce wrote:
> Hi,
>  
> I have created a WidgetsList object which contains a number of 
> attributes (individual widgets) for creating a database record. I want 
> to use the same WidgetList for editing the database record, however 
> the edit page needs to display additional fields that are not needed 
> for the create page. Is there some way I can pass a parameter to the 
> widget so that it will know to display additional fields when it is 
> being used for the edit page?

I suspect you tried inheritance and it didn't work :-/

They are lists.



class AddFields(WidgetsList):
   foo = Text()

add_form = Form(....,fields=AddFields())

class EditFields(WidgetsList):
   bar = Text()

edit_form = Form(...,fields = AddFields() + EditFields())



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to