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. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/UA0jtNOk5IkJ.
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.

Reply via email to