In the example below I am trying to get list_display to show the the
"fullname" that was defined in def__str__(self).   It's not working.
Can anybody tell me how I can do it.

Many thanks

MerMer

class UserProfile(models.Model):
      user=models.OneToOneField(User)
      activation_key = models.CharField(maxlength=40)
      key_expires = models.DateTimeField()
      street_address=models.CharField(maxlength=400)
      city_address= models.CharField(maxlength=100)
      postcode=models.CharField(maxlength=50)
      def __str__(self):
           self.fullname = "%s %s" %(self.user.first_name,
self.user.last_name)
           return self.fullname
      class Admin:
          list_display=('self.fullname','city_address','postcode')
          pass


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

Reply via email to