The person here is a person object returned from the request
PersonAddressBook.objects.select_related().get(person = person).client The code above returns client object how can i rewrite it to return multiple clients. a person object may be in multiple personaddressbook so filter and not get is what am trying to do but i want the client objects without using a for-loop
there is how the other models look
class Client: #stuff here class Person: #stuff here class PersonAddressBook: client = models.ForeignKey(Client) person = models.ForeignKey(Person) this works but it will take longer and use more memory as it will load on my system i want use just database.
clients =[] adbook = PersonAddressBook.objects.filter(person = person).select_related() for contact in adbook: clients.append(contact.client)