On 29 mar, 09:19, Kenneth Gonsalves <law...@thenilgiris.com> wrote:
> 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
> KGhttp://lawgon.livejournal.com
> Coimbatore LUG roxhttp://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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment