hmarr/mongoengine — pull request #536 by Tevino (2012-07-13 08:03:53+00:00)
Title: add CalculatedField

usage:

class Foo(Document):
begin_time = FloatField()
end_time = FloatField()
duration = CalculatedField('_do_subtract')
_do_subtract(self):
return self.end_time - self.begin_time

Thanks.