我计划在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翻译成等价的postgressql,而不显式地提到decimal_places
和max_digits
?你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐