Re: Migrating existing data into Django models

2005-12-13 Thread Grigory Fateyev
Hello tonemcd! On Tue, 13 Dec 2005 10:27:30 - you wrote: > > I found that any field with primary_key=True leads to a field name > with _id appended. So your field will look like user_id_id in the > database. > > Try dropping the '_id' suffix perhaps? > Nop, Traceback (most recent call

Re: Migrating existing data into Django models

2005-12-09 Thread Grigory Fateyev
Hello tonemcd! On Thu, 08 Dec 2005 07:07:41 -0800 you wrote: > > What does your auth model look like? > class User(auth.User): user_id = meta.CharField(maxlength=12, primary_key=True) user_active = meta.BooleanField(default=True) username = meta.CharField(maxlength=25)

Re: Migrating existing data into Django models

2005-12-08 Thread tonemcd
What does your auth model look like?

Re: Migrating existing data into Django models

2005-12-08 Thread Grigory Fateyev
Hello Jacob Kaplan-Moss! On Tue, 6 Dec 2005 14:16:06 -0600 you wrote: > class Story(meta.Model): > headline = meta.CharField(maxlength=100, primary_key=True) > body = meta.TextField() > > you'll get:: > > CREATE TABLE stories ( > headline

Re: Migrating existing data into Django models

2005-12-07 Thread tonemcd
Hi Eric, I did a dig around and found emails from you on the Zope lists (on my machine) going back to July 2001 - but I know you've been around longer than that ;) Yup, it's the primary_key field option I'm using - that seems to work fine, my only problem now is that PostGres is rather less

Re: Migrating existing data into Django models

2005-12-06 Thread Kenneth Gonsalves
On Wednesday 07 Dec 2005 1:51 am, Eric Walstad wrote: > Nice to see a familiar "face" from the good old Zope days. >  Welcome to the wonder world of Django. i have also noticed one or two familiar faces from the good old Plone days ;-) -- regards kg http://www.livejournal.com/users/lawgon

Re: Migrating existing data into Django models

2005-12-06 Thread Eric Walstad
On Tuesday 06 December 2005 12:01 pm, tonemcd wrote: > The primary keys in the > tables vary, but are mostly varchar. [...] > It seems though that Django uses ints for primary keys quite > extensively, and I guess that will cause some problems with (say) > creating new entries using the admin

Re: Migrating existing data into Django models

2005-12-06 Thread Jacob Kaplan-Moss
On Dec 6, 2005, at 2:01 PM, tonemcd wrote: It seems though that Django uses ints for primary keys quite extensively, and I guess that will cause some problems with (say) creating new entries using the admin system. Does anyone have any pointers/hints/howtos etc on how to do this with a

Migrating existing data into Django models

2005-12-06 Thread tonemcd
Hi all, I've been digging around Django for a while now as a possible replacement for some Zope 2 sites we are running. The sites have large MySQL (and in some cases PostGres) backends. The primary keys in the tables vary, but are mostly varchar. One thing I'm very keen to use the data model