My App having db class,
class invoice(db.Model):
location_code = db.StringProperty()
invoice_no = db.IntegerProperty()
product_tax_rate = db.FloatProperty()
basic_tax_rate = db.FloatProperty()
addl_tax_rate = db.FloatProperty()
.
.
.
In this, i wanted to set product_tax_rate‘s value as default value for property basic_tax_rate‘s property if addl_tax_rate‘s value is 0.
How can i add a generic procedure for this logic in this class method?
Please let me know if you still not getting this requirement.
You can use NDB and ComputedProperty todo something like: