Try either:

   def __str__(self):
        return '%s - %s' % (self.name, str(self.category))

or

   def __str__(self):
        return '%s - %s' % (self.name, self.category.name)

The problem is that it is using __repr__ to print it out, not str. To
force str you have to use the str(). Or you can override the __repr__
method, I suggest using the str() method, __repr__ should be used more
as a debug tool rather then representing the object w/ more debug
output then str does.

Chris


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