Re: Using composition for building database models

2008-12-10 Thread Malcolm Tredinnick
On Wed, 2008-12-10 at 11:11 -0800, Mr. T wrote: > > On Dec 10, 11:04 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: [...] > > It sounds like you are looking for model inheritance: > > > > http://docs.djangoproject.com/en/dev/topics/db/models/#id4 > > > > Karen > > Stupid of me to write

Re: Using composition for building database models

2008-12-10 Thread Mr. T
On Dec 10, 11:04 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Dec 10, 2008 at 1:51 PM, Mr. T <[EMAIL PROTECTED]> wrote: > > > As I am a noob this is very possibly a stupid question > > > Basically I would like to be able to use composition to build some of > > my models without

Re: Using composition for building database models

2008-12-10 Thread Karen Tracey
On Wed, Dec 10, 2008 at 1:51 PM, Mr. T <[EMAIL PROTECTED]> wrote: > > As I am a noob this is very possibly a stupid question > > Basically I would like to be able to use composition to build some of > my models without having separate tables being created. > > class baseClass: > field1 >

Using composition for building database models

2008-12-10 Thread Mr. T
As I am a noob this is very possibly a stupid question Basically I would like to be able to use composition to build some of my models without having separate tables being created. class baseClass: field1 class foo(models.Model): my_base = baseClass() class