On Jan 14, 2010, at 11:53 PM, E. Hakan Duran wrote:
> Thanks a lot for the quick response.
>
> On Thursday 14 January 2010 23:08:43 Shawn Milochik wrote:
>
>> ...
>> woman = Woman.objects.get(lastname__exact = 'Test')
>> couple = Couple.objects.get(couple = woman.couple)
>>
>> Note that this i
Thanks a lot for the quick response.
On Thursday 14 January 2010 23:08:43 Shawn Milochik wrote:
> ...
> woman = Woman.objects.get(lastname__exact = 'Test')
> couple = Couple.objects.get(couple = woman.couple)
>
> Note that this is making the assumption that there is only one woman with
> that l
E. Hankan,
On Thu, Jan 14, 2010 at 10:53:31PM -0500, E. Hakan Duran wrote:
Take the following with a grain, or three, of salt. I'm a little rusty. I
converted a web site to Django back in the pre-1.x days and am just getting
back to tinkering with Django to enhance the functionality of said sit
Your couple_query returns a queryset. Even if there's only one result, you're
not getting just the one woman, but a queryset object. I think you want
something more like:
woman = Woman.objects.get(lastname__exact = 'Test')
couple = Couple.objects.get(couple = woman.couple)
Note that this is mak
Hi all,
I don't have a technical background, so please be gentle with me.
I have two models with a ForeignKey relation: "couple" and "woman". I am
trying to set up a query that lists the women with lastname='Test' along with
some of their information from the "woman" model as well as some from
5 matches
Mail list logo