Answers for "django float validator"

0

django float validator

from django.core.validators import MaxValueValidator, MinValueValidator

...
weight = models.FloatField(
    validators=[MinValueValidator(0.9), MaxValueValidator(58)],
)
Posted by: Guest on January-29-2021

Python Answers by Framework

Browse Popular Code Answers by Language