Re: get all foreign keys that point to

2010-01-22 Thread Malcolm Box
The list of all drivers in a team is (assuming self is a team instance) drivers = self.driver_set().all() Hope that helps. Malcolm On Thu, Jan 21, 2010 at 2:49 AM, Ether Joe wrote: > Hello there, quick (hopefully) question for you - how do I get a list > of records in a foreign table that p

get all foreign keys that point to

2010-01-20 Thread Ether Joe
Hello there, quick (hopefully) question for you - how do I get a list of records in a foreign table that point back to the object making the query? For example - a Formula One racing team, where each Team has 0 or more Drivers, and each Driver can be a member of only one Team. How do I get a list