On Tue, 2011-03-29 at 00:11 -0700, gontran wrote: > UserProfile(models.Model): > user = models.OneToOneField(User) > company = models.ForeignKey(Company) > > Company(models.Model): > product_licences = models.manyToManyField(ProductLicence) > > Product(models.Model): > ...some fields... > > ProductLicence(models.Model): > product = models.ForeignKey(Product) > > News(models.Model): > related_products = models.ManyToManyField(Product) > > I already know how to retrieve all distinct products for which the > company of the user owns licences, but now, what I want to do is to > retrieve all news, for a given user, that are related to products, for > which the company of the user owns licences. > >
Product is not linked to any model? -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.