There are attributes for first_name and last_name, why wouldn't
user.first_name work?

On May 19, 1:15 am, Ayaz Ahmed Khan <a...@ayaz.pk> wrote:
> On 19-May-09, at 5:12 AM, neri...@gmail.com wrote:
>
> > class Employee(models.Model):
> >  user= models.ForeignKey(User, unique=True)
> >   phone = PhoneNumberField()
> >   ssn = models.CharField(max_length=11)
> >   address = models.CharField(max_length=50)
> >   city = models.CharField(max_length=30)
> >   state = USStateField(default='WA')
> >   zip_code = models.CharField(max_length=10)
>
> >   def __unicode__(self):
> >       return self.user.full_name
>
> Is there anattributeor property that goes by the name `full_name`
> defined on theUsermodel? As far as I can tell, no. You can, however,
> get to the full name associated with aUserinstance by calling 
> theUser.get_full_name() method.
>
> --
> Ayaz Ahmed Khan
>
> If I'd known computer science was going to be like this, I'd never
> have given up being a rock 'n' roll star.
>          -- G. Hirst
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to