I have a many-to-many relationship between two models, People and
Entities (enities are departments and offices etc). 

Some of these relationships are managed by the user in admin, but others
are implicit. 

For example, if the user adds John to the Laser Research Lab
Administrative Office, it means that John is also a member of the Laser
Research Lab. This is because the Entities are in a hierarchy, and being
a member of one means being a member of its parent.

Because there will be thousands of people and hundreds of entities, I
can see that my present functions to find out what members an entity
has, or what entities someone is a member of, will involve lots of looping.

I would rather assemble this information only when the user makes a
change to the admin, and for each person have a list of entities that
can quickly be read off, and vice-versa for the entities.

I think this means that I need to add a routine to my admin.py so that
when the user hits Save, it will also manually assemble the information
and save it for the affected models. 

Is that correct? If so, what is doing this called, so I can look it up
in the documentation?

Thanks,

Daniele


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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