It worked....Thanks for the help.. On Fri, Jan 22, 2010 at 2:05 PM, Cummins Group <cumminsgrou...@gmail.com>wrote:
> The field in the model is Floatfield...Now what must be the problem... > > > On Fri, Jan 22, 2010 at 12:07 PM, Karen Tracey <kmtra...@gmail.com> wrote: > >> On Fri, Jan 22, 2010 at 1:13 AM, grp25 <cumminsgrou...@gmail.com> wrote: >> >>> got error: >>> Cannot convert float to Decimal. First convert the float to a string >>> >>> our code is: >>> usr.ratings=usr.ratings-0.5 >>> usr.save() >>> >>> 'usr.ratings' is a float field. >>> >> >> Are you absolutely sure of that? It rather sounds like usr.ratings is a >> DecimalField, not a FloatField. Perhaps it is a float at the database level >> but defined as a DecimalField in the model? In which case the fix is to make >> it a FloatField in the Django model so that the database and Django >> representations match. >> >> Karen >> >> >> -- >> 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<django-users%2bunsubscr...@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.