On Thu, Feb 5, 2009 at 12:58 AM, Waruna de Silva <waruna....@gmail.com>wrote:
> Thanks Ramior for info > > In Models is it possible to name to Fields as primary keys > > as exmaple, there are two fields > gid = models.IntegerField() > business_id = models.ForeignKey(Business) > > how to make both of them as primary keys , following isn't work > gid = models.IntegerField(primary_key=True) > business_id = models.ForeignKey(Business, primary_key=True) > No, you cannot do this at present. Composite primary keys may be supported at some point, but they are not now. Karen > > > > On Tue, Feb 3, 2009 at 5:05 PM, Ramiro Morales <cra...@gmail.com> wrote: > >> >> On Tue, Feb 3, 2009 at 9:29 AM, Waruna de Silva <waruna....@gmail.com> >> wrote: >> > Hi, >> > >> > In Django is it possible to created models automatically from >> > existing database. >> >> Yes, see >> >> >> http://docs.djangoproject.com/en/dev/howto/legacy-databases/#howto-legacy-databases >> >> -- >> Ramiro Morales >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---