Re: Decimal value allowed for auto primary key

2014-10-26 Thread Kafex
Ok, that makes sense, thanks for the reply! On Sunday, October 26, 2014 7:34:06 PM UTC-4, Tom Evans wrote: > > On Sun, Oct 26, 2014 at 12:37 AM, Kafex > > wrote: > > If I have the following model... > > class FruitType(models.Model): > > name = models.CharField(max_length=255) > > > > And

Re: Decimal value allowed for auto primary key

2014-10-26 Thread Tom Evans
On Sun, Oct 26, 2014 at 12:37 AM, Kafex wrote: > If I have the following model... > class FruitType(models.Model): > name = models.CharField(max_length=255) > > And I insert some records... > FruitType.objects.create(name="Apple") > FruitType.objects.create(name="Orange") > > Why is this valid?

Re: Decimal value allowed for auto primary key

2014-10-25 Thread Kafex
Whoops... just to clarify... FruitType.objects.get(id=2.9) # Gets me the apple I meant to comment that this gets me the orange. On Saturday, October 25, 2014 8:37:55 PM UTC-4, Kafex wrote: > > If I have the following model... > class FruitType(models.Model): > name = models.CharField(max_leng