On 10-Jan-07, at 6:13 PM, Sebastien Armand [Pink] wrote:
> class Person(models.Model):
> ...
> mother = models.ForeignKey('Person')
yes or use 'self'
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
--~--~-~--~~~---~--~~
Y
"Did you know about mutation? :-)" I was expecting this one!
Well thanks a lot!!
2007/1/10, Ivan Sagalaev <[EMAIL PROTECTED]>:
>
>
> Sebastien Armand [Pink] wrote:
> > class Person(models.Model):
> > ...
> > mother = models.ForeignKey('Person')
> > ...
> >
> > Will this work?
>
> Use
Sebastien Armand [Pink] wrote:
> class Person(models.Model):
> ...
> mother = models.ForeignKey('Person')
> ...
>
> Will this work?
Use models.ForeignKey('self')
> For example if I've got a Body class and a Legs class, I know that I'll
> never have a body with more than 2 legs
Did
Hello everyone,
I'm new to Django and trying to set up a small website with it. I've only
started creating the model and already got a few troubles!
1. I need to relate an object to itself! For example if my object is a
Person, I want to have a field mother which will be the key of an other
Perso
4 matches
Mail list logo