Hi Jason and Paul

On Apr 20, 2:52 pm, Paul Childs <[EMAIL PROTECTED]> wrote:
> Hey Jason
>
> Try:
> return self.title + self.member.first_name + self.member.last_name

That's still not going to work since member is a many-to-many field --
self.member really references a collection of values not a single
value. So, self.member does not have a field called first_name or
last_name.

You could:

1. use self.member[0].first_name if you know that there's at least one
record for member.

2. loop through all self.member objects and print the first and last
name of each.

3. change that field to a foreign key (if that's a possibility.) In
this case, Paul's solution above will work.

-Rajesh



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

Reply via email to