This seems like somehting that would be implemented after model subclassing is implemented.
On Jan 12, 1:15 pm, Wanrong Lin <[EMAIL PROTECTED]> wrote: > Hi, > > I have just started playing with Django and found it a pleasure to set > up web site (even just a toy system so far) using the frame work. Thank > you very much! > > I have a data model case that I think probably is quite common to other > people too, and I did not find a way to do it with current Django, so I > wonder whether the developers can take a look of it. > > My situation is: > > I have quite a few data model classes that share some common fields, so > I have the following model code: > > -------------------- > class Common(models.Model): > # common fields > ...... > > class Model_A(Common): > # extra fields > ...... > > class Model_B(Common): > # extra fields > ...... > ------------------- > > That works, except that a database table will be created for "Common", > which will never be used by itself. > > So I will just keep "Common" table empty, not a big deal. But, to make > it more elegant (which I suspect a lot of Python programmers are > obsessed about), can we add some kind of mechanism to tell Django that > "Common" is an "abstract model" that is not intended to be used by > itself, so no table needs to be created? > > Thank you for giving it a thought. > > Best regards. > > Wanrong --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
