The problem seems to be in the postgres backend or Psycopg 2.5.2 adapter... I have the same problem and the data in postgres is 0.00000000 but when fetched by django it comes up as Decimal("0E-8") (with shell access not only admin), if I switch to sqlite3 backend then it works perfectly
On Thursday, January 9, 2014 3:37:38 AM UTC-5, Timothy W. Cook wrote: > > > On Wed, Jan 8, 2014 at 10:42 PM, Dennis Lee Bieber > <wlf...@ix.netcom.com<javascript:> > > wrote: > > >> If Django's "DecimalField" is NOT use Python's Decimal type, I'd >> be >> > concerned... Python's Decimal is NOT a "float". >> >> However, the conversion of a Decimal to/from PostgreSQL might >> result in >> a floating point value -- which I'd consider a flaw in the database >> adapter >> as PostgreSQL does have a NUMERIC data type that should map directly to >> Python Decimal. >> -- >> > > It does use decimal.Decimal and it does map to PostgreSQL numeric. The > representation via the ORM though ends up being in scientific number format > in the admin interface. This is what caused my concern. I expected a > visually decimal number; a 0 or as PostgreSQL/PGAdmin displays it, > 0.0000000000. > > > > -- > MLHIM VIP Signup: http://goo.gl/22B0U > ============================================ > Timothy Cook, MSc +55 21 94711995 > MLHIM http://www.mlhim.org > Like Us on FB: https://www.facebook.com/mlhim2 > Circle us on G+: http://goo.gl/44EV5 > Google Scholar: http://goo.gl/MMZ1o > LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4e7c7a58-789e-49d7-8445-4e1dd46c8545%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.