List of floats on the google appengine
Been hunting for an hour or so. It would appear that db.Float does not exist. Is there any way to store a list of floats in a ListProperty? Here's the basic idea:
class Data(db.Model):
temperatures = db.ListProperty(item_type=???)
Tha开发者_StackOverflow中文版nks in advance.
There is a FloatProperty but that has nothing to do with ListProperty
's first argument, which, and I quote, is just "a Python type or class" (and float
is explicitly listed here as a perfectly OK value type, too). IOW,
temperatures = db.ListProperty(float)
should work just fine (float
is a Python built-in identifier, of course). What problems are you seeing when you do that?
精彩评论