i’m trying to add a new price field into Django models. Here is my code i’ve added into models.py :
price = models.DecimalField(
max_digits=10, decimal_places=2, default=0.00, null=True
)
when i try to migrate i’m having this error:
.venvLibsite-packagesdjangodbmodelsfields_init_.py”, line 1807, in to_python
raise exceptions.ValidationError(
django.core.exceptions.ValidationError: [‘“” value must be a decimal number.’]
Tried to add :
blank=True
did’nt work.
New contributor
KazzCode is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.