On 11/8/06, iain duncan <[EMAIL PROTECTED]> wrote: > g.addUser(u) > > On the last command I get: > AttributeError: 'Group' object has no attribute 'addUser' > > And am then stuck. Any tips?
Looks like SQLObject. Most of the tutorials are written for SQLObject, you have to translate to the equivalent SQLAlchemy, so be sure you understand SA. In this case, what you're looking for is: g.users.append(u) and may need to do a: session.save(g) session.flush() If you're not seeing users in dir(g), you have duplicate fields in the model. Remove the groups many_to_many from both Users and Permissions. Also, if you don't have ipython installed, get it installed. It's nice to be able to type g.<tab> and see the list of available attributes. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

