Re: Want help in Django basic configuration

12 views
Skip to first unread message

Daniel Roseman

unread,
Nov 3, 2012, 9:50:15 AM11/3/12
to django...@googlegroups.com
On Saturday, 3 November 2012 05:55:21 UTC, sudeep gangal wrote:
hey guys hiii,
I am new to the django. I used the inspectdb command to copy the content of my db table made in mysql in django model.py. But that file doesn't contain any foreign key etc.
I have declared primary keys and unique keys. But for relating 2 tables a foreign key is required. Can anyone suggest me a solution to the above defined problem

regards
Sudeep Gangal

inspectdb is a best guess. It can't necessarily tell the difference between an IntegerField and a ForeignKey. But you can just change the generated code accordingly.
--
DR. 
Reply all
Reply to author
Forward
0 new messages