On Sep 14, 5:55 am, Marco Mariani <[EMAIL PROTECTED]> wrote:
> krsyoung ha scritto:
>
> > Is there some way I can make a common_fields subclass that I can then
> > reuse in both of the approver_fields and admin_fields?  Basically I
> > want to pull out "name" so I don't have to repeat it for each widget.
>
> You can instead use..
>
> class Common(WidgetsList):
>     name = TextField()
>
> class Secret(WidgetsList):
>     secret = TextField()
>
> first = Common()
> second = Common() + Secret()
>

Thanks Marco, that did the trick.  The help is much appreciated.

> BTW. In python, you should really keep your class names with an
> Uppercase First Letter.

Point taken, new to python, I claim ignorance :-)


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