[Answer]-Django foreign key doesn't work

1👍

As with all fields, you can use the db_column parameter to specify the database column represented by the field:

company = models.ForeignKey(MMCompany, db_column='CompanyUniqueID')

0👍

You can also use models.OneToOneField() is ForeignKey.

👤armin

Leave a comment