Re: HELP: Foreign keys, models, and querysets

2008-06-09 Thread Huuuze
Its a typo. It should've been... >> pid = models.ForeignKey(Person) On Jun 9, 5:06 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > What is this `pid = models.ForiegnKey()` ? > > On 9 июн, 23:44, Huuuze <[EMAIL PROTECTED]> wrote: > > > I have the following models in my models.py file: > > > >>

Re: HELP: Foreign keys, models, and querysets

2008-06-09 Thread Alex Koshelev
What is this `pid = models.ForiegnKey()` ? On 9 июн, 23:44, Huuuze <[EMAIL PROTECTED]> wrote: > I have the following models in my models.py file: > > >> class Person(models.Model): > >> pid = models.AutoField(primary_key=True) > >> fname = models.CharField(max_length=50) > >> lname =

Re: HELP: Foreign keys, models, and querysets

2008-06-09 Thread Richard Dahl
from: http://www.djangoproject.com/documentation/db-api/ Backward If a model has a ForeignKey, instances of the foreign-key model will have access to a Manager that returns all instances of the first model. By default, this Manager is named FOO_set, where FOO is the source model name,

HELP: Foreign keys, models, and querysets

2008-06-09 Thread Huuuze
I have the following models in my models.py file: >> class Person(models.Model): >> pid = models.AutoField(primary_key=True) >> fname = models.CharField(max_length=50) >> lname = models.CharField(max_length=50) >> class Books(models.Model) >> bid = models.AutoField(primary_key=True) >>