Re: Django orm and no primary key

2012-01-10 Thread Thorsten Sanders
Am 10.01.2012 20:46, schrieb Ian Clelland: This is possible -- there was some discussion on this list about it just a few days ago. If you tell Django that another field is the actual primary key, then it will not assume that there is an 'id' column (which is good, because otherwise it will t

Re: Django orm and no primary key

2012-01-10 Thread Ian Clelland
On Tue, Jan 10, 2012 at 9:04 AM, webonomic wrote: > The Django Book alludes to this, and maybe the comments there will > help you. > > Go to http://www.djangobook.com/en/1.0/chapter05/ > and search for this paragraph: > > "Finally, note we haven’t explicitly defined a primary key in any of > thes

Re: Django orm and no primary key

2012-01-10 Thread webonomic
The Django Book alludes to this, and maybe the comments there will help you. Go to http://www.djangobook.com/en/1.0/chapter05/ and search for this paragraph: "Finally, note we haven’t explicitly defined a primary key in any of these models. Unless you instruct it otherwise, Django automatically g