[Django]-Avoid Circular import in Django

11👍

Remove the Company import from actions/models.py and use a string instead:

class Action(models.Model):
    company = models.ForeignKey('companies.Company', blank=True, null=True, related_name='activity', on_delete=models.CASCADE)

Leave a comment