Re: query related question

2010-01-14 Thread E. Hakan Duran
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

query related question

2010-01-14 Thread E. Hakan Duran
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

Re: TypeError: coercing to Unicode: need string or buffer, long found

2010-01-05 Thread E. Hakan Duran
On Tuesday 05 January 2010 21:01:44 Karen Tracey wrote: > ... > Change this to return unicode(self.coupleid) > Thanks! signature.asc Description: This is a digitally signed message part.

TypeError: coercing to Unicode: need string or buffer, long found

2010-01-05 Thread E. Hakan Duran
Hi all, I am just following the tutorial with minimal coding skills/knowledge. I have a models.py file part of which is shown below: --- # -*- coding: utf-8 -*- from django.db import models import datetime # Create your models here. class Couple(models.Model): coupleid =

Re: TypeError: 'CharField' object is not callable

2010-01-04 Thread E. Hakan Duran
On Monday 04 January 2010 23:54:13 Marc Aymerich wrote: > ... > take a look at middle_initial of woman class ;) Thank you very much for the fast and accurate response. Now it worked without problem. signature.asc Description: This is a digitally signed message part.