Re: error on models with foreign key on each other

2007-07-29 Thread Ben Ford
It looks like your problem is that you have a ForeignKey pointing both ways... This is unnecessary. You only need one ForeignKey, pointing from the pointing from the 'child' to the 'parent'... I would guess from your snippet, that one employee can have many contracts and assignments so you need to

Re: error on models with foreign key on each other

2007-07-29 Thread James Bennett
On 7/29/07, james_027 <[EMAIL PROTECTED]> wrote: > D:\private\james\documents\django\ksk>python manage.py validate > manning.employee: Reverse query name for field 'employee_contract' > clashes with field 'EmployeeContr > act.employee'. Add a related_name argument to the definition for >

error on models with foreign key on each other

2007-07-29 Thread james_027
Hi, I am trying to migrate an existing application to django. I am encountering the following problem with this models D:\private\james\documents\django\ksk>python manage.py validate manning.employee: Reverse query name for field 'employee_contract' clashes with field 'EmployeeContr