On 5/14/07, James Bennett <[EMAIL PROTECTED]> wrote: > > On 5/14/07, Sven Herzing <[EMAIL PROTECTED]> wrote: > > and I like to get the Products for a specific group and for a specific > > company. > > Given a specific company name and a specific product group name, the > following retrieves all the products which belong to that company and > that group: > > >>> acme_company = Company.objects.get(name__exact='Acme') > >>> acme_product_group = ProductGroup.objects.get(name__exact='Acme > product group')
bugfix: :) acme_products = acme_company.product_set.filter(company__pk=acme_company.id, group__pk=acme_product_group.id) --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---