I've searched this group for threads related to multitable inheritance.  
The one most similar to my query so far was titled "multiple children in 
multitable inheritance", from Apr. 2008.  Like the original poster, I'd 
thought of Bar as a possible subclass of Place, which might share the same 
Place parent/base class as a Restaurant.  However, that analogy doesn't 
quite capture what I'm trying to do, so I'll use another.

Say I am managing a martial arts tournament, where Members participate.  I 
would use Member as the base class that would hold all the details common 
to each person, which would include the login name.

Some Members are qualified to be Judges, Timekeepers, Referees, etc.  So 
those people can assume multiple roles at a tournament, but only one such 
role at a time.

The main reason I'd like to subclass Member is so that person-specific 
*and*role-specific information can be displayed depending on the Member's 
current role.  I saw Malcolm Tredinnick's comment to the effect that the 
answer to using inheritance is usually "no".  However, if I think about 
using Many-to-Many relations to track the Member's available roles, I run 
into the problem that not every Member will be a Judge, so I can't just 
have a "Member.roles -> intermediateTable <- subclass" field.

Furthermore, I need to delegate to another class of Member (TourneyAdmin?) 
the ability to add/manage/remove Members and their roles, and it would be 
very convenient if the admin interface could be used for that purpose.  
However, I can write my own management screens if that turns out to be 
necessary.

I would be very grateful for suggestions on how best to handle this type of 
use case.  I'm sure it's been solved (many times) before, but it seems 
quite difficult to come up with just the right search terms to zero in on 
the right threads without a bunch of false positives.

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to