Re: Help using the django queries API to select columns from multiple tables

2009-06-30 Thread Daniel Roseman
On Jun 29, 11:25 am, Sam Walters wrote: > Hi Daniel > Thank you very much for your help. > The reasons why the foreign key is in the other table is because an event > can have multiple locations, its unusual however the Aviation industry has > an event which will fly from location A to B. Yes it

Re: Help using the django queries API to select columns from multiple tables

2009-06-30 Thread micval
Hi there, not sure if I understand your scenario correctly, but it seems to me, that Daniel might be right about the ForeignKey being in the Location as the wrong idea. If you need multiple locations for one Event, then there's ManyToManyField for that (or possibly two ForeignKey(Location) attrib

Re: Help using the django queries API to select columns from multiple tables

2009-06-29 Thread Sam Walters
Hi Daniel Thank you very much for your help. The reasons why the foreign key is in the other table is because an event can have multiple locations, its unusual however the Aviation industry has an event which will fly from location A to B. Yes it seems counter-intuitive at first glance. The other

Re: Help using the django queries API to select columns from multiple tables

2009-06-29 Thread Daniel Roseman
On Jun 29, 4:57 am, Sam Walters wrote: > Hi > I am using django 1.0 to redevelop a website. > I have readhttp://docs.djangoproject.com/en/1.0/topics/db/queries/and cant > work out how to do my query except using raw sql. It would be great to be > able to use the django query api so i can stack qu

Help using the django queries API to select columns from multiple tables

2009-06-28 Thread Sam Walters
Hi I am using django 1.0 to redevelop a website. I have read http://docs.djangoproject.com/en/1.0/topics/db/queries/ and cant work out how to do my query except using raw sql. It would be great to be able to use the django query api so i can stack queries more easily. Just one working example woul