from django.db import models
from authors.models import Author
class Post(models.Model):
author = models.ForeignKey(Author)
Alternatively the model name can be used, rather than the model class, for example.
from django.db import models
class Post(models.Model):
author = models.ForeignKey('authors.Author')
By using a model name there are fewer imports at the top of the module and fewer occurrences of circular import dependencies between Django applications. What are the disadvantages to using a model name and why not always use them?