Why not store the value as a string in the datastore and convert it to
a decimal in Python on retrieval? You could use a property on your
model to do it for you.

import decimal

class MyModel(db.Model):
    string_amount = db.StringProperty(multiline=False)

    def get_amount(self):
          return decimal.Decimal(self.string_amount)

    def set_amount(self, value):
          self.string_amount = str(value)

    amount = property(get_amount, set_amount)



- Justin

On Dec 5, 3:11 am, "Fred Janon" <[EMAIL PROTECTED]> wrote:
> Float and Decimal are two different types. Float is used in scientific
> calculations, Decimal for accounting/financial applications. Decimal exists
> in Python but doesn't seem to be implemented in the Datastore.
>
> Fred
>
> On Fri, Dec 5, 2008 at 14:58, lock <[EMAIL PROTECTED]> wrote:
>
> > There is the FloatProperty, pretty sure that's what your after.
>
> >http://code.google.com/appengine/docs/datastore/typesandpropertyclass...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to