Starting with specific record in a child table want to do the
following.

1.  Access a related field 'Brand Name' in the parent table.

2.  Retrieve a query set of records in the Parent table that match the
Brand name.   BUT  I want't to exclude the intial record I started
with.

Can anybody recommend an elegant way to achieve point this.  I can
retrieve the qs with all the related brand records but  I cannot work
out how to retrieve the query set whilst ommitting the initial record.

Currently I have.

1. qs=Child.objects.get(id= record_id)
2. brand = qs.parent.brand
3. related_brands = Parent.objects.filter(brand=brand)

MerMer


--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to