I'd like to convert dollars to cents on save for the Django model.
class Bank(models.Model):
backup = False
...
device_type = models.BigIntegerField(verbose_name='device type')
transaction_sum = models.BigIntegerField(verbose_name='sum in dollars') # this field
How can I do it by using the Django Model environment to save it in cents?
UPD: the question is more about getters and setters. Analogy:
I need the same conversion on the fly here.