models created from database table

2009-02-03 Thread Waruna de Silva
Hi, In Django is it possible to created models automatically from existing database. Thanks Waruna --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us

Re: models created from database table

2009-02-03 Thread Ramiro Morales
On Tue, Feb 3, 2009 at 9:29 AM, Waruna de Silva 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 --~--~-~--~~

Re: models created from database table

2009-02-04 Thread Waruna de Silva
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_k

Re: models created from database table

2009-02-04 Thread Karen Tracey
On Thu, Feb 5, 2009 at 12:58 AM, Waruna de Silva 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 pri

Re: models created from database table

2009-02-04 Thread Waruna de Silva
Thanks What is the best possible way to handle that type of a problem On Thu, Feb 5, 2009 at 11:45 AM, Karen Tracey wrote: > On Thu, Feb 5, 2009 at 12:58 AM, Waruna de Silva wrote: > >> Thanks Ramior for info >> >> In Models is it possible to name to Fields as primary keys >> >> as exmaple, the

Re: models created from database table

2009-02-04 Thread Karen Tracey
On Thu, Feb 5, 2009 at 1:19 AM, Waruna de Silva wrote: > Thanks > > What is the best possible way to handle that type of a problem > > I don't know, it is not something I've ever needed. If you Google "composite primary keys" and Django you'll get hits that point to the ticket where the feature i