[Answered ]-How to set already existing field as a foreign key to another table?

2👍

Did you try to_field option?

You can do:

 b = models.ForeignKey(B, to_field="other_id")

However, the catch is that field other_id must satisfy unique=True.

Leave a comment