问题
The docs only show using a many-to-many-through/intermediary model where the model is in the same app. How can I do this with the intermediary table in a different app? I don't think from app import intermediary
works, as the through
attribute is declared within apostrophes.
回答1:
Answer: Use 'app.model'
. I didn't think it would work in this context, but it does
来源:https://stackoverflow.com/questions/31746235/django-1-8-how-do-i-use-a-model-in-a-different-app-as-a-through-in-a-many-to