Do this method have to return a string? I have the following model:
class Price(models.Model):
name = models.DecimalField(max_digits=6, decimal_places=2)
price_cat = models.ForeignKey(PriceCategory)
def __str__(self,):
return self.name
class Admin:
pass
//////////////////
However, when I view this is the admin I get the following error:
'__str__ returned non-string (type float)'. Is there anyway to solve
this problem? Do I have to return a string?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---