On Aug 29, 7:18 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I can get user_utilization but member.user gives me django object. How > can I get that information? > > In [199]: for member in prj_members: > .....: member.user > .....: member.user_utilization > .....: > Out[199]: <django.db.models.fields.related.ManyRelatedManager object > at 0x016AD5 > 70> > Out[199]: 1.0 > Out[199]: <django.db.models.fields.related.ManyRelatedManager object > at 0x016ADB > 10> > Out[199]: 1.0 > > Thanks a lot > Manoj
Because it's a ManyToMany field, you can have muliple users associated with one project. (Perhaps you should actually call the field user rather than user). So the field itself returns a Manager - just like project.objects, you have to use all() or filter() to return a queryset or get() to return a single user. For now you probably just want member.user.all() -- DR. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---