On 5/24/07, wesman <[EMAIL PROTECTED]> wrote: > I just don't want to have to write this stuff all again and > maintain two copies of it - can I use multi-inheritance and create a > model that is sub-classed from my "job" class and the models class?
Sure. The only time you'll run into problems is when you try to have one model class inherit from another model class (which currently doesn't work); inheriting from other Python classes is fine. So this will work, for example: class MyModel(models.Model, MyOtherClass) But this won't: class MyOtherModel(MyModel, MyOtherClass) And it'll fail because of the attempt to subclass another model, not because of the multiple inheritance. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---