List Info

Thread: get_list() with a ManyToMany relationship




get_list() with a ManyToMany relationship
user name
2006-04-27 18:27:29
I have the following problem:

Give two models and a M2M relationship:

class Product(meta.Model):
    category =meta.IntegerField()
    ...

class Part(meta.Model):
    products = meta.ManyToManyField(Product)
    ...

I want to find all products that belongs to a certain
category (say
"3") and includes a particular part
"p"; furthermore I'd like to use
limit&offset in the search parameters. How to do that?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )