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?
FruitType.objects.get(id=1.2) # Gets me the apple
FruitType.obje
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 = mode
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
3 matches
Mail list logo