Hi TG group,

I'm trying to make a simple CRUD for available users and roles in a
system. The problem that I have is the RelatedJoins and Checkboxes. I
don't know how I have to bind the atribute roles (is a list) with one
of each checkboxes that sets the roles. Below, the code.

My classes,

class User(SQLObject):
        roles = RelatedJoin('Rol', addRemoveName='_rol')

class Rol(SQLObject):
        name = UnicodeCol(length=255, alternateID=True,
                     alternateMethodName='by_name')
        description = UnicodeCol(length=255, default=None)

My view,

admin = W.CheckBox(label=_(u'Administrator'), name=u'roles'
editor = W.CheckBox(label=_(u'Editor'), name=u'roles'

Thanks in advance!

-- 
Lautaro Mazzitelli
E-mail: lmazzitelli -at- gmail -dot- com
Weblog colectivo: http://www.mazziblog.com.ar
Fotos: http://www.flickr.com/photos/mazzi/

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