[Answered ]-Not able to use foreign key from another app?

2👍

You should be setting your foreign key like this:

models.ForeignKey('travelers.ShortInfoTraveler')

If you want to use a string to set the foreign key relation.

Or you should just set ShortInfoTraveler without it being a string since you’ve imported it.

Setting it to "ShortInfoTraveler" is looking for the model in the current models file instead of your other app which you can see in the error message output back.

Leave a comment