Re: Can you make a subclass of a model just to alter behavior?

2010-09-30 Thread Russell Keith-Magee
On Fri, Oct 1, 2010 at 2:57 AM, orokusaki wrote: > I'm looking to do the opposite of what Django's proxy model does. I > want to subclass Model, add some extra methods to it, add behavior to > save(), set a default manager that adds some my-application-specific >

Re: Can you make a subclass of a model just to alter behavior?

2010-09-30 Thread Shawn Milochik
> > Hmm.. I can't think of any caveats off the top of my head. Did you try that? > The only thing that smells a little like trouble to me is setting a > default manager. If you create a custom manager, then add it to each model as "objects," then it'll be the default (and only) manager and any

Re: Can you make a subclass of a model just to alter behavior?

2010-09-30 Thread Gonzalo Delgado
El 30/09/10 15:57, orokusaki escribió: > I'm looking to do the opposite of what Django's proxy model does. I > want to subclass Model, add some extra methods to it, add behavior to > save(), set a default manager that adds some my-application-specific > methods, and then subclass that to create

Can you make a subclass of a model just to alter behavior?

2010-09-30 Thread orokusaki
I'm looking to do the opposite of what Django's proxy model does. I want to subclass Model, add some extra methods to it, add behavior to save(), set a default manager that adds some my-application-specific methods, and then subclass that to create most of the models in my application. Is this