Great, thanks! Sebastjan
On 3/31/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Sat, 2007-03-31 at 11:26 +0200, Sebastjan Trepca wrote: > > Hi all, > > > > I noticed there are few threads about model inheritance and proposals, > > but they all reflect the inheritance to the database also. > > I don't really want inheritance in database with all those joins etc, > > what I would need is just something that will spare me the > > copy/pasting of similar fields. I have many models that share same > > fields, like News, Post, Image etc which have date_posted, title, > > abstract ... What would be nice is to create an "abstract model" that > > has all these similar fields and then inherit it in normal model. > > > > I already tried with basic Python class inheritance, but it didn't > > work. Any suggestions ? :) > > Django's model inheritance will have an attribute to indicate that the > base class is an abstract base, just as you are asking about. I'm not > sure whether it will be an attribute on the base class or something on > the derived class, but it will certainly be possible to do this. You > aren't the only one with a use-case like this. > > Regards, > Malcolm > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---