On 2/12/07, miya <[EMAIL PROTECTED]> wrote: > > On Feb 12, 2:33 am, "Jorge Vargas" <[EMAIL PROTECTED]> wrote: > > On 2/11/07, iain duncan <[EMAIL PROTECTED]> wrote: > > > > > On Sun, 2007-11-02 at 13:42 -0800, miya wrote: > > > > For example, suppose a User has some pets (say 'dog', 'cat', > > > > 'giraffe', 'alligator', 'anaconda', etc...), and in the form I need to > > > > pre-select tha animals/pets that some dude has. The question is how do > > > > I pass the user's id to myCallable? > > > > if your using identity you just need to call the current identify from > > inside myCallable. identity.current will return a User instance, so > > something like Pets.selectBy(owner=identity.current) should work. > > Uhm, the problem is that I don't need to get the current user's pet, > but some other's guy. > For example, I have a form where I can edit some user's pets, so once > I select a user, the user's id would be sent (vía post/get) and in the > following url I would have sth like this... > > http://localhost:8081/pets/modify?id=4 > > What I need is to modify the user which id is '4'. > oh that's even simplier User.get(id) and then do the join.
> > > > by the way size 5 is the default :p > > didn't know that! :P > > thanks for the tip > > -- > miya > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

