Re: Foreign Key don't work for me

2012-05-16 Thread Sandeep kaur
On Thu, May 17, 2012 at 6:09 AM, Jon Paugh wrote: > Ah. I believe, the Amount.job_no (i.e. the foreign key) should not be filled > with the id of the Client object, but with the actual client object, that > is, > > job_no = Client.objects.get(cd['job_no']) > > That matches the abstract relationshi

Re: Foreign Key don't work for me

2012-05-16 Thread Jon Paugh
Ah. I believe, the Amount.job_no (i.e. the foreign key) should not be filled with the *id* of the Client object, but with the actual client * object*, that is, job_no = Client.objects.get(cd['job_no']) That matches the abstract relationship of, "This Client corresponds to this Amount.", then Dj

Foreign Key don't work for me

2012-05-16 Thread Sandeep kaur
In my Django application, I am using forms for the users to enter the information. In this, I have linked two tables namely, ClientJob and Amount, by using foreign key. Here are the 2 tables: models.py>