Re: Hi! Here's a new Django beginner with a few questions.

2007-01-10 Thread Kenneth Gonsalves
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

Re: Hi! Here's a new Django beginner with a few questions.

2007-01-10 Thread Sebastien Armand [Pink]
"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

Re: Hi! Here's a new Django beginner with a few questions.

2007-01-10 Thread Ivan Sagalaev
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

Hi! Here's a new Django beginner with a few questions.

2007-01-10 Thread Sebastien Armand [Pink]
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