coercing to Unicode: need string or buffer, Decimal found

2009-03-22 Thread Timothy

Hi Folks,

create a model

a = models.DecimalField(max_digits=7, decimal_places=2, null=True)

Try do insert values in admin-form.

Get error message shown in Subject.

What happens here? And how to avoid/solve this problem?

DecimalField is premise for that field.

Thx for any help

Timothy


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



Re: (solved) - coercing to Unicode: need string or buffer, Decimal found

2009-03-22 Thread Timothy

Hi Folks,

the problem was

def __unicode__(self):
  return self.b

in model-definition

Sorry for annoyance

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