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.