49
You can find the solution in the docs:
If you need to create a relationship on a model that has not yet been defined, you can use the name of the model, rather than the model object itself:
class Car(models.Model): manufacturer = models.ForeignKey('Manufacturer') # ... class Manufacturer(models.Model): # ...
Source:stackexchange.com