Re: Tables with same schema

2009-05-01 Thread Ramashish Baranwal
> Plain ol' Python multiple inheritance should work. Just define the > fields you want in some class: > {{{ > class PersonMixin(object): >     first = models.CharField(max_length=16) >     last = models.CharField(max_length=16) > > class Person(models.Model, PersonMixin): >     pass > > class Pers

Re: Tables with same schema

2009-05-01 Thread George Song
Model, PersonMixin): pass }}} On Apr 30, 10:58 pm, Ramashish Baranwal wrote: > > > I want to create several tables with same schema. This is to partition > > > the data into different tables. Apart from having model classes with > > > same definition, is there another

Re: Tables with same schema

2009-04-30 Thread Alex Gaynor
On Fri, May 1, 2009 at 1:58 AM, Ramashish Baranwal < ramashish.li...@gmail.com> wrote: > > > > > > I want to create several tables with same schema. This is to partition > > > the data into different tables. Apart from having model classes with > > > same

Re: Tables with same schema

2009-04-30 Thread Ramashish Baranwal
> > > I want to create several tables with same schema. This is to partition > > the data into different tables. Apart from having model classes with > > same definition, is there another way to do it? > > > Here is a trivial example that duplicates the class

Re: Tables with same schema

2009-04-30 Thread Alex Gaynor
On Fri, May 1, 2009 at 1:21 AM, Ramashish Baranwal < ramashish.li...@gmail.com> wrote: > > Hi, > > I want to create several tables with same schema. This is to partition > the data into different tables. Apart from having model classes with > same definition, is th

Tables with same schema

2009-04-30 Thread Ramashish Baranwal
Hi, I want to create several tables with same schema. This is to partition the data into different tables. Apart from having model classes with same definition, is there another way to do it? Here is a trivial example that duplicates the class definition- class Person(models.Model): first