Foreign key from one app into another in Django
It is also possible to pass the class itself:
from django.db import models
from production import models as production_models
class Car(models.Model):
manufacturer = models.ForeignKey(production_models.Manufacturer)
According to the docs, your second attempt should work:
To refer to models defined in another application, you must instead explicitly specify the application label. For example, if the Manufacturer model above is defined in another application called production, you'd need to use:
class Car(models.Model):
manufacturer = models.ForeignKey('production.Manufacturer')
Have you tried putting it into quotes?