Re: Recommendation system problem

2008-11-10 Thread Mr. Z
Jonathan, Thank you! I've tried the code you posted and it works like a charm. It really has helped me to understand how to do it. I have modified it to include also a calculation for how many teas have in common Peter and the people with at least one of the same teas as Peter. This way I can the

Re: Recommendation system problem

2008-11-09 Thread Jonathan Buchanan
Mr. Z wrote: > I have these models: > > KindOfTea(models.Model): > name = models.CharField(max_length=100, unique=True) > description = models.TextField() > > Person(models.Model): > name = models.CharField(max_length=100, unique=True) > likes = models.ManyToManyField(KindOfTea,

Recommendation system problem

2008-11-09 Thread Mr. Z
I have these models: KindOfTea(models.Model): name = models.CharField(max_length=100, unique=True) description = models.TextField() Person(models.Model): name = models.CharField(max_length=100, unique=True) likes = models.ManyToManyField(KindOfTea, related_name='liked_by') I ha