> 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
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
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
>
> > 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
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
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
6 matches
Mail list logo