On Oct 16, 11:19 pm, Greg <[EMAIL PROTECTED]> wrote:
> Michael,
> Yea I'm already using stringformat in my template.  However, in my
> view code is where I create the order.  When the order is added in the
> view and I then look at it in the admin the price is displayed as 74.0
> instead of 74.00.  Here is part of my view code:
[snip]

I believe you're looking to change the default formatting behavior of
the form field that the Admin uses.  Admin uses oldforms, and I don't
know much about it.

Looking at the oldforms module, there is a DecimalField that is
probably being used by the Admin to display your ``amount`` field.
Since DecimalField falls back to using the TextField.render method,
you're getting the default python display behavior.

I'm not sure if there's a way to tell the Admin which form fields to
use when displaying  your Order object, but that's probably what needs
to happen.  That would allow you to provide better formatting with a
FancyDecimalField with an overridden ``render`` method.

I know I didn't solve your problem, but hopefully it's more clear what
needs to be accomplished, and maybe you can get better answers...


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