I don't think you want unicode, I think you want: class Meta: verbose_name="Company" verbose_name_plural = "Companies"
On Sun, Nov 25, 2012 at 8:27 AM, ajendrex <hurbi...@gmail.com> wrote: > Hello, > > I following the tutorial and realized that the admin pages are not using the > __unicode__() methods declared in my model: > > One of my classes: > > class Company(models.Model): > name = models.CharField(max_length=20) > description = models.CharField(max_length=500) > url = models.URLField(max_length=200) > createdAt = models.DateTimeField(auto_now_add=True) > > def __unicode__(self): > return self.name > > But the admin page to view and add companies shows the current list of > companies with the label "Company object" instead of the names that I gave > to those registers. The same happens with the other classes of my model. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/-P162L-ktJYJ. > 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. -- ...we look at the present day through a rear-view mirror. This is something Marshall McLuhan said back in the Sixties, when the world was in the grip of authentic-seeming future narratives. He said, “We look at the present through a rear-view mirror. We march backwards into the future.” http://www.warrenellis.com/?p=14314 -- 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.