On 8/4/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Next time I'm picking two Place types that have absolutely nothing in > common so that you can't twist my examples into cases like this. > Restaurants and SmallCometsInTheOortCloud, for example. I'm making this > too easy for you.
Here's a use case where the functionality you've proposed would be just fine. My current application which has Person and Organisation classes. As people and organisations have certain attributes and relations in common (e.g addresses, emails and telephone numbers), my model includes another class named Party. That is: - Person has foreign key to Party - Organisation has foreign key to Party - Address has foreign key to Party - A party may have many addresses, and will either have a related Person, or a related Organisation It will be great to be able to make Party a "real" superclass. Furthermore, because of the two-levels deep relationships between Person, Party and Address, I have had to build custom CRUD pages for Person administration, and for Organisation administration. With inheritance, I'm supposing the Django admin app will now be able show Addresses on the Person and Organisation pages, so that's about 6 boring pages I won't have to write next time. Cheers, Alan. -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" 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-developers -~----------~----~----~----~------~----~------~--~---
