Djangoでアプリケーションをまたいだ外部キー

Djangoでアプリケーションを分割して開発することがあると思いますが、別アプリケーションのモデルに外部キー参照をつける場合の方法
class ClassA(models.Model): class_b = models.ForeignKey('otherapp.ClassB')
他のアプリケーションをotherappとすると、上記の通りドットで装飾した名前を指定する。
-
前の記事
Django&MySQLで、「Field ‘id’ doesn’t have a default value」 2015.01.18
-
次の記事
djangoに別のPCからアクセスできない 2015.01.23