views:

91

answers:

1
class MyTable(models.Model):
    lat = models.FloatField(blank=True)
    long = models.FloatField(blank=True)

How do I make them unsigned? Able to accept negative .

+4  A: 

FloatField can 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.

Eli Bendersky