Jake,
I've made the change to where both of my fields are now of type
DecimalField.  However, I'm getting the same error:

TypeError
float() argument must be a string or a number

Caught an exception while rendering: float() argument must be a string
or a number

26      {% for a in thespinfo %} # This is the line that is red
27      <FORM NAME="form1" method="POST" ACTION="/rugs/cart/addtocart/">
28      <input name="style_id" type="hidden" value="{{thecinfo.id}}">
29      <input name="choice_id" type="hidden" value="{{ a.id }}">
30      <tr>
31      <td>{{ a.size }}</td>
32      <td>${{ a.price|floatformat:2 }}</td>

Here is what I have is my models file:

models.DecimalField(max_digits=6, decimal_places=2)

/////////////

Thanks

On Aug 20, 12:04 am, jake <[EMAIL PROTECTED]> wrote:
> greg,
>
> Greg wrote:
> > Jake,
> > No I didn't.  When I tried the  'floatformat:2' I made sure that my
> > model fields were of type FloatField.
>
> i have used DecimalField in my model and |floatformat:2 in my template
> and gotten the behavior you're looking for; that's probably the
> combination you want here.
>
> best
> jake


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to