Hi, Why not
def __unicode__(self): return u"%d" % self.mynumber ? Nuno On Wed, Jul 14, 2010 at 11:15 AM, alan-l <alan.lough...@essexcricket.org.uk> wrote: > Hi, > > in the tutorial i see that to return a string or a combination of > strings, i can do: > def __unicode__(self): > return u'%s %s' % (self.firstname, self.surname) > > > what do i need to do to return a number? or more importantly, what is > the def called to ensure it is read and returned when looking at the > class in admin? > > > Thanks, > > Alan > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@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. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.