On Oct 2, 2008, at 10:31, Eric wrote: > > Hi, > I saw few questions from people who wonder how to manage tables > without primary key (when using inspectdb on a legacy db); > A great hope is born: I just discovered that this problem could be > adressed, at least it works with sqlite: > > just add this field (rowid or oid is the sqlite automatic pk) in the > model: > > rowid = models.IntegerField(primary_key=True, editable=False) > > It works ! it's so simple ! I love django ! > > Maybe this tip could be added in the doc; for others sgbd, there must > be something similar. > And why not put this in the inspectdb command ...
Because it's a dirty, dirty hack. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---