Re: simple model problem

2009-04-24 Thread Malcolm Tredinnick
On Fri, 2009-04-24 at 13:21 -0700, bshaurette wrote: [...] > My preference would be just to add an 'id' column to the table, but > we're trying to keep db changes to a minimum (changing one means > changing the same table in at least a dozen more - not optimal, but it > is what it is). Without i

Re: simple model problem

2009-04-24 Thread bshaurette
Is it actually possible to define a primary key that is a concatenation of two fields? I'm working on a project to get the admin to work on top of a legacy db - it's an old db with a few, ahem, design problems. For the most part I've been able to get around the bad structure with a few simple mo

Re: simple model problem

2009-03-05 Thread AmanKow
On Mar 4, 8:57 pm, Malcolm Tredinnick wrote: > On Wed, 2009-03-04 at 10:43 -0800, arbi wrote: > > Hello, > > I am new to Django and programming... > > I have a model similar to this one : > > > class myModel : > >   attribute 1 = models.ForeignKey(myModel2, primary_key = True) > >   attribute 2 =

Re: simple model problem

2009-03-04 Thread Malcolm Tredinnick
On Wed, 2009-03-04 at 10:43 -0800, arbi wrote: > Hello, > I am new to Django and programming... > I have a model similar to this one : > > class myModel : > attribute 1 = models.ForeignKey(myModel2, primary_key = True) > attribute 2 = models.ForeignKey(myModel3, primary_key = True) > > is it

simple model problem

2009-03-04 Thread arbi
Hello, I am new to Django and programming... I have a model similar to this one : class myModel : attribute 1 = models.ForeignKey(myModel2, primary_key = True) attribute 2 = models.ForeignKey(myModel3, primary_key = True) is it possible to have two primary keys? In fact I want that the id of