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 system. > > Does anyone have any pointers/hints/howtos etc on how to do this with a > minimum of hassle?
Hi Tone, Nice to see a familiar "face" from the good old Zope days. Welcome to the wonder world of Django. I've not used Django with non-integer-pk's yet, but I suspect what your after is the "primary_key" field option when defining your Django model. Have a look here: <http://www.djangoproject.com/documentation/model_api/> and search for "primary_key" Also, there's an "Integrating with a legacy database" section of the docs here: <http://www.djangoproject.com/documentation/legacy_databases/> Good luck, Eric.