Doug, Thanks for the reply. It's weird, because in my admin when I show the amount in my list_display (list_display = ('b_name', 'thirdtime', 'amount', 'customer', 'id')). I see the two zeroes. However, when I drill down on a specific record I only see one zero. This is a problem because in my view I send an email to the customer. The email contains the price of the order, and If the price of the order is 74.00...I don't want them to see 74.0.
Thanks for any help On Oct 17, 8:25 am, Doug Van Horn <[EMAIL PROTECTED]> wrote: > 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 -~----------~----~----~----~------~----~------~--~---