Wow, very cool, I didn't know that James! Again, thank you! I was trying
obj.portfolio = portid and then obj.portfolio.id = portid < that was really bad according to django :-) J On 5/16/07, James Bennett <[EMAIL PROTECTED]> wrote: > > > On 5/16/07, John M <[EMAIL PROTECTED]> wrote: > > portfolio = Portfolio.objects.get(pk=portid) > > > > obj.portfolio = portfolio > > Somewhat undocumented, but you should be able to do > > obj.portfolio_id = portid > > Instead of doing the lookup and assigning the object, if you're > concerned about the extra DB hit. > > -- > "Bureaucrat Conrad, you are technically correct -- the best kind of > correct." > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---