class MyTable(models.Model):
lat = models.FloatField(blank=True)
long = models.FloatField(blank=True)
How do I make them signed? Able to accept negative .
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
FloatFieldcan accept floating point numbers, negatives included.If you need positive-only integers, there’s PositiveIntegerField. Positive-only floats are a much rarer need, so I don’t think they’re natively supported – but you can, of course, implement this restriction programatically.