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

WidgetLists are lists, you do not subclass them; you add them.


The following will not work:

class Common(WidgetsList):
    name = TextField()

first = Common()

class Secret(Common):
   secret = TextField()

second = Secret()



You can instead use..

class Common(WidgetsList):
    name = TextField()

class Secret(WidgetsList):
    secret = TextField()

first = Common()
second = Common() + Secret()


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


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