Django add decimal places in models

    0

    0

    Neuron123

    The Place model defines three fields: name, description, and longitude and latitude. Each field can have a maximum of 30 digits and 15 decimal places.

    class Place(models.Model):
      name = models.TextField()
      description = models.TextField()
      longitude = models.DecimalField(max_digits=30, decimal_places=15)
      latitude = models.DecimalField(max_digits=30, decimal_places=15)
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.