Hi again,
a follow up:

It seems as if it is a design decision from the pymsql developers to
return Decimal for BIGINT (sorry; not longint, as I said before). It
is documented here:

<cite src= 
http://freshmeat.net/projects/pymssql/?branch_id=59462&release_id=205925
>
big numbers (MONEY, SMALLMONEY, DECIMAL, NUMERIC, BIGINT) are returned
as decimal so no precision is lost.
</cite>

So my guess would be that the combination of this decision and my use
of pymssql together with Django on a Windows XP environment with
Swedish locale is the cause of the problem when Decimal causes a
locale lookup (if that presumption is correct).

Could I possibly solve this situation by calling setlocale to set it
back to US or C after the database has returned its result?

I presume the check of not-a-number introduced in Django v9369 is
correct, and that my previous locale-incorrect numbers slipped through
and somehow got handled by the templates floatformat before this check
was introduced.

BWT: Not using BIGINTs for the record IDs is not an option for me,
since I'm not the manager of the system and the database contains
around 30 millions of records and is growing, so BIGINTs are there for
safety.

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