Re: Model Reuse

2006-10-19 Thread Malcolm Tredinnick
On Wed, 2006-10-18 at 23:49 -0700, Steve Wedig wrote: > I thought I'd post my solution in case anyone faces a similar situation. > > Problem: I am using an intermediate model (R) to represent a > relationship between models Location and Thread. Given an instance of > Location, say x, I want the p

Re: Model Reuse

2006-10-18 Thread Steve Wedig
I thought I'd post my solution in case anyone faces a similar situation. Problem: I am using an intermediate model (R) to represent a relationship between models Location and Thread. Given an instance of Location, say x, I want the property x.threads to return a QuerySet containing all of the rel

Re: Model Reuse

2006-10-16 Thread Steve Wedig
Alrighty, I've pulled out the relationships into separate separate models, as shown below. This correctly represents the information. However, I would like to work with the sets of related threads directly, rather than always traversing the intermediate models. I'm not sure how to write the funct

Re: Model Reuse

2006-10-16 Thread Malcolm Tredinnick
On Mon, 2006-10-16 at 02:44 -0700, Steve Wedig wrote: > I have a thread model that I would like to reuse in multiple places. > So a thread should have no knowledge of where it is contained. > > I also have a group model and a location model. I would like to have > multple threads in a group (1-n

Model Reuse

2006-10-16 Thread Steve Wedig
I have a thread model that I would like to reuse in multiple places. So a thread should have no knowledge of where it is contained. I also have a group model and a location model. I would like to have multple threads in a group (1-n reln between group and thread). I would also like threads to app