我计划在Postgres中使用下表
create table Transaction (
tax_amount decimal
);
我希望不明确指定位数。
对于Django模型,我使用
tax_amount = models.DecimalField(blank=True, null=True)
我遇到错误
billing.Transaction.tax_amount: (fields.E130) DecimalFields must define a 'decimal_places' attribute.
billing.Transaction.tax_amount: (fields.E132) DecimalFields must define a 'max_digits' attribute.
我想知道,如何将Django转换为等效的Postgres SQL,而无需明确提及decimal_places
和max_digits
?