Re: Custom Managers and Model Methods

2007-10-17 Thread Jason Massey
Thanks, Rajesh, that most definately helps. I figured that I'd have to resort to something like option #1 after many google searches. On 10/17/07, RajeshD <[EMAIL PROTECTED]> wrote: > > > Hi Jason, > > > Using the models below I'd like to be able to create Querysets such as: > > > > a = Treatme

Re: Custom Managers and Model Methods

2007-10-17 Thread RajeshD
Hi Jason, > Using the models below I'd like to be able to create Querysets such as: > > a = Treatment.objects.filter(total_dose__range=(4000,1)) > b = a.filter(tumor__patient__gender = 'M') > > Both of the above work, but then I'd like to have an additional filter: > c = b.filter(tumor__patie

Custom Managers and Model Methods

2007-10-17 Thread Jason Massey
Using the models below I'd like to be able to create Querysets such as: a = Treatment.objects.filter(total_dose__range=(4000,1)) b = a.filter(tumor__patient__gender = 'M') Both of the above work, but then I'd like to have an additional filter: c = b.filter(tumor__patient__get_followup_length_