Hello,

I have an Employee profile associated with Users who are staff, how do
I return the associated user attributes from within the profile model
i.e., 'full_name' from Users? Anytime I try to access the User
attributes from within the profile class I get errors: Cannot resolve
keyword 'full_name' into field.

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

        class Meta:
                ordering = ['last_name']


Thanks for any help,

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