﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36673	DecimalField max_digits and decimal_places should be optional and more general	Gavin Wahl		"In Postgres and the SQL standard, it is not necessary to define a precision and scale for NUMERIC/DECIMAL fields. However, Django requires that they be specified.

https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL

I would like to be able to create an unconstrained NUMERIC field with `DecimalField()`, but Django gives the error:

{{{
(fields.E130) DecimalFields must define a 'decimal_places' attribute.
fields.E132) DecimalFields must define a 'max_digits' attribute.
}}}

Also, the precision needs to be allowed to be less than the scale. `NUMERIC(1,2)` is a valid type that stores numbers of the form `-0.00, -0.01,...0.08, 0.09` but Django says:

{{{
(fields.E134) 'max_digits' must be greater or equal to 'decimal_places'.
}}}"	New feature	closed	Database layer (models, ORM)	5.2	Normal	duplicate		Gavin Wahl	Unreviewed	0	0	0	0	0	0
