Hi Malcolm,
> I forgot to mention this in my last reply, but you didn't actually
> answer the question that Karen asked. If you open up a Python prompt on
> your machine and do this:
>
> >>> import decimal
> >>> decimal.Decimal('1.0')
>
> does it raise an exception?
Sorry, I forgot to report on that part, but I did that without any
problem. Here is the check:
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import decimal
>>> decimal.Decimal('1.0')
Decimal("1.0")
>>>
Also sorry for seemingly forking the issue in two threads, but this
was an effect of me (being a confused non-programmer) trying to sort
things out and respond to your suggestions, respectively.
I'll read and try to understand and follow your suggestions for
checking on locale before and after the database call and get back
with a report on that.
I've already hardcoded variable values as you suggest and sent them
off to the template before the database call (lst_result = cur.fetchall
()), and at that point floatformat works fine with a decimal point
(and a string with decimal comma breaks the floatformat).
Sending hardcoded variable values on the line after the database call
gives the opposite result; values with decimal point break the
floatformat, but strings with decimal comma don't break floatformat,
but are on the other hand not displayed after doing floatformat.
This happens without even doing anything at all with the values
returned from the database call. Actually, I don't do anything with
the record ID returned as Decimal() in the code that started breaking
floatformat in the first place.
Thanks for all your help and once again my apologies for fragmented
and confused reports.
Ulf
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---