I am working on adding a Django model where there are a number of fields that I want created as a DecimalField
, but I don't know the max_digits
or decimal_places
for each of these columns. I am using a postgres database; the table structure comes from and will be populated by an API source.
I was able to get DDL for the table, create the table in a blank postgres db, and use inspectdb
to create a Django model.
The result assigned all DecimalField
columns with: models.DecimalField(max_digits=65535, decimal_places=65535, blank=True, null=True)
The model contains ~170 DecimalField
fields. Are there any ideas or suggestions on how I should handle the creation of these fields?